diff --git a/CHANGELOG.md b/CHANGELOG.md index 972a8fe1c52c74e3f643a6f39fd76a87d1613413..e84904021825a652b93b35969ef27dd2acfde9a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,4 +2,4 @@ * removed the decorator syntax for transaction, it''s confusing and contrary to Zen of Python * fixed some random bug -* fixed docs for CPManager +* fixed docs for CPManager, also fixed a bug for it diff --git a/satella/__init__.py b/satella/__init__.py index 7cc264cd30fe6c5fa30e205867e76d06c0c97672..cb17521c105d937af41ba6491eecd14a2e73d2f0 100644 --- a/satella/__init__.py +++ b/satella/__init__.py @@ -1 +1 @@ -__version__ = '2.21.1a1' +__version__ = '2.21.1' diff --git a/satella/coding/resources/cp_manager.py b/satella/coding/resources/cp_manager.py index 6dd0daca564f9712ce79905f2516e37e851aaa47..6d0d714a8472308c7add622c0f398611f6c6b1f4 100644 --- a/satella/coding/resources/cp_manager.py +++ b/satella/coding/resources/cp_manager.py @@ -97,7 +97,7 @@ class CPManager(Monitor, Closeable, tp.Generic[T], metaclass=abc.ABCMeta): if self.id_to_times[obj_id] == self.max_cycle_no: with Monitor.acquire(self), silence_excs(KeyError): self.spawned_connections -= 1 - del self.id_to_times[connection] + del self.id_to_times[obj_id] self.teardown_connection(connection) else: