Skip to content

Commit

Permalink
Merge pull request #12 from steeve/patch-1
Browse files Browse the repository at this point in the history
Clean the circular reference between Connection and BaseHandler
  • Loading branch information
deavid committed Jan 26, 2015
2 parents fb75467 + 80fa603 commit 60bb5da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bjsonrpc/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,15 @@ def _shutdown(self):
You should add cleanup code here. Remember to call the parent
function.
"""
pass # In the future, here we could have some internal clean-up code.
self.close()

def close(self):
"""
Cleans some variables before the object is freed. close is called
manually from connection whenever a handler is going to be deleted.
"""
self._methods = {}
self._conn = None

def add_method(self, *args, **kwargs):
"""
Expand Down

0 comments on commit 60bb5da

Please sign in to comment.