[ARVADOS] updated: 17ce65cd493d8040640f5a5c3d2a97a5175a0465

git at public.curoverse.com git at public.curoverse.com
Fri Jul 24 14:21:25 EDT 2015


Summary of changes:
 sdk/python/arvados/events.py | 8 ++++++++
 1 file changed, 8 insertions(+)

       via  17ce65cd493d8040640f5a5c3d2a97a5175a0465 (commit)
      from  51641ba5579cb9ebe14234e0888a162b46d1627d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 17ce65cd493d8040640f5a5c3d2a97a5175a0465
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Fri Jul 24 14:21:58 2015 -0400

    6706: Add comments about what is going on with EventClient.close()

diff --git a/sdk/python/arvados/events.py b/sdk/python/arvados/events.py
index 15bcf2c..4581f05 100644
--- a/sdk/python/arvados/events.py
+++ b/sdk/python/arvados/events.py
@@ -41,8 +41,16 @@ class EventClient(WebSocketClient):
         self.stop.set()
 
     def close(self, code=1000, reason=''):
+        # parent close() method sends a asynchronous "closed" event to the server
         super(EventClient, self).close(code, reason)
+
+        # if server doesn't respond by finishing the close handshake, we'll be
+        # stuck in limbo forever.  We don't need to wait for the server to
+        # respond to go ahead and actually close the socket.
         self.close_connection()
+
+        # wait for websocket thread to finish up (closed() is called by
+        # websocket thread in as part of terminate())
         while not self.stop.is_set():
             self.stop.wait(1)
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list