From 78bedfddc3fb31a4d6b81dbe4792a2a668e19fa4 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sun, 21 Dec 2014 09:55:04 +1100 Subject: [PATCH] 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 --- transport.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport.go b/transport.go index 9e7b106..10339a0 100644 --- a/transport.go +++ b/transport.go @@ -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)