diff --git a/ably/http/http.py b/ably/http/http.py index 8f077e58..a01e6935 100644 --- a/ably/http/http.py +++ b/ably/http/http.py @@ -105,12 +105,13 @@ class Http(object): 'http_max_retry_duration': 15, } + __session = requests.Session() + def __init__(self, ably, options): options = options or {} self.__ably = ably self.__options = options - self.__session = requests.Session() self.__auth = None def dump_body(self, body): diff --git a/ably/rest/rest.py b/ably/rest/rest.py index c6749f3f..20685641 100644 --- a/ably/rest/rest.py +++ b/ably/rest/rest.py @@ -64,11 +64,6 @@ def __init__(self, key=None, token=None, token_details=None, **kwargs): else: options = Options(**kwargs) - # if self.__keep_alive: - # self.__session = requests.Session() - # else: - # self.__session = None - self.__http = Http(self, options) self.__auth = Auth(self, options) self.__http.auth = self.__auth