forked from Mirrors/oauth2
oauth2: support CancelRequest when Transport.Base is nil
Fixes #54 Change-Id: If00d0ce8e1c0cf32a4b7dba5506187b9012940bc Reviewed-on: https://go-review.googlesource.com/1879 Reviewed-by: Burcu Dogan <jbd@google.com>
This commit is contained in:
parent
f5b40b26f1
commit
78bedfddc3
|
@ -62,7 +62,7 @@ func (t *Transport) CancelRequest(req *http.Request) {
|
|||
type canceler interface {
|
||||
CancelRequest(*http.Request)
|
||||
}
|
||||
if cr, ok := t.Base.(canceler); ok {
|
||||
if cr, ok := t.base().(canceler); ok {
|
||||
t.mu.Lock()
|
||||
modReq := t.modReq[req]
|
||||
delete(t.modReq, req)
|
||||
|
|
Loading…
Reference in New Issue