From 024782eacce1351cee8ba6c47a3e24a63bd6cd3e Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Apr 30 2018 20:56:11 +0000 Subject: also forget requests session in _forget() --- diff --git a/koji/__init__.py b/koji/__init__.py index fd6836d..9d44488 100644 --- a/koji/__init__.py +++ b/koji/__init__.py @@ -2331,7 +2331,19 @@ class ClientSession(object): """Forget session information, but do not close the session This is intended to be used after a fork to prevent the subprocess - from affecting the session accidentally.""" + from affecting the session accidentally. + + Unfortunately the term session is overloaded. We forget: + - the login session + - the underlying python-requests session + + But the ClientSession instance (i.e. self) persists + """ + + # forget our requests session + self.new_session() + + # forget our login session, if any if not self.logged_in: return self.setSession(None)