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:
Brad Fitzpatrick 2014-12-21 09:55:04 +11:00 committed by Burcu Dogan
parent f5b40b26f1
commit 78bedfddc3
1 changed files with 1 additions and 1 deletions

View File

@ -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)