Commits

Jacob Söndergaard  committed e3d3117

only try to callback on close, when a callback is given

  • Participants
  • Parent commits 7a203b0

Comments (0)

Files changed (1)

File beanstalkt/beanstalkt.py

             self._stream.set_close_callback(callback)
         if self.closed():
             # already closed
-            callback()
+            if callback:
+                callback()
         else:
             self._stream.write(b'quit\r\n', self._stream.close)