From fdbd9e148ddaff8394fb789780d984ddfcc339cf Mon Sep 17 00:00:00 2001 From: Pablo Castellano Date: Sun, 24 May 2020 17:17:27 +0200 Subject: [PATCH] Close requests.Session after use (fixes #187) --- pyswagger/contrib/client/requests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyswagger/contrib/client/requests.py b/pyswagger/contrib/client/requests.py index a7bce1d..dcdff89 100644 --- a/pyswagger/contrib/client/requests.py +++ b/pyswagger/contrib/client/requests.py @@ -67,6 +67,7 @@ def append(name, obj): ) rq = self.__s.prepare_request(rq) rs = self.__s.send(rq, stream=True, **self.__send_opt) + self.__s.close() resp.apply_with( status=rs.status_code,