From 3b9d1c0f5d2996b946ab71704995b752c0ff8f60 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Fri, 11 Nov 2016 16:10:12 -0800 Subject: [PATCH] Fix refresh to lazily load connection --- lib/bitbucket/connection.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/bitbucket/connection.rb b/lib/bitbucket/connection.rb index e9cbf36a44b..201e7e3b808 100644 --- a/lib/bitbucket/connection.rb +++ b/lib/bitbucket/connection.rb @@ -45,8 +45,7 @@ module Bitbucket @expires_at = response.expires_at @expires_in = response.expires_in @refresh_token = response.refresh_token - - @connection = OAuth2::AccessToken.new(@client, @token, refresh_token: @refresh_token, expires_at: @expires_at, expires_in: @expires_in) + @connection = nil end private