##// END OF EJS Templates
cleanup socket cleanup...
MinRK -
Show More
@@ -127,7 +127,10 b' class ZMQChannelHandler(AuthenticatedZMQStreamHandler):'
127 # closed before the ZMQ streams are setup, they could be None.
127 # closed before the ZMQ streams are setup, they could be None.
128 if self.zmq_stream is not None and not self.zmq_stream.closed():
128 if self.zmq_stream is not None and not self.zmq_stream.closed():
129 self.zmq_stream.on_recv(None)
129 self.zmq_stream.on_recv(None)
130 # close the socket directly, don't wait for the stream
131 socket = self.zmq_stream.socket
130 self.zmq_stream.close()
132 self.zmq_stream.close()
133 socket.close()
131
134
132
135
133 class IOPubHandler(ZMQChannelHandler):
136 class IOPubHandler(ZMQChannelHandler):
@@ -524,6 +524,8 b' class ConnectionFileMixin(Configurable):'
524 socket_type = channel_socket_types[channel]
524 socket_type = channel_socket_types[channel]
525 self.log.debug("Connecting to: %s" % url)
525 self.log.debug("Connecting to: %s" % url)
526 sock = self.context.socket(socket_type)
526 sock = self.context.socket(socket_type)
527 # set linger to 1s to prevent hangs at exit
528 sock.linger = 1000
527 if identity:
529 if identity:
528 sock.identity = identity
530 sock.identity = identity
529 sock.connect(url)
531 sock.connect(url)
General Comments 0
You need to be logged in to leave comments. Login now