Show More
@@ -209,6 +209,7 b' class ShellChannel(ZMQSocketChannel):' | |||
|
209 | 209 | def run(self): |
|
210 | 210 | """The thread's main activity. Call start() instead.""" |
|
211 | 211 | self.socket = self.context.socket(zmq.DEALER) |
|
212 | self.socket.linger = 1000 | |
|
212 | 213 | self.socket.setsockopt(zmq.IDENTITY, self.session.bsession) |
|
213 | 214 | self.socket.connect(self.address) |
|
214 | 215 | self.stream = zmqstream.ZMQStream(self.socket, self.ioloop) |
@@ -408,6 +409,7 b' class IOPubChannel(ZMQSocketChannel):' | |||
|
408 | 409 | def run(self): |
|
409 | 410 | """The thread's main activity. Call start() instead.""" |
|
410 | 411 | self.socket = self.context.socket(zmq.SUB) |
|
412 | self.socket.linger = 1000 | |
|
411 | 413 | self.socket.setsockopt(zmq.SUBSCRIBE,b'') |
|
412 | 414 | self.socket.setsockopt(zmq.IDENTITY, self.session.bsession) |
|
413 | 415 | self.socket.connect(self.address) |
@@ -468,6 +470,7 b' class StdInChannel(ZMQSocketChannel):' | |||
|
468 | 470 | def run(self): |
|
469 | 471 | """The thread's main activity. Call start() instead.""" |
|
470 | 472 | self.socket = self.context.socket(zmq.DEALER) |
|
473 | self.socket.linger = 1000 | |
|
471 | 474 | self.socket.setsockopt(zmq.IDENTITY, self.session.bsession) |
|
472 | 475 | self.socket.connect(self.address) |
|
473 | 476 | self.stream = zmqstream.ZMQStream(self.socket, self.ioloop) |
@@ -518,7 +521,7 b' class HBChannel(ZMQSocketChannel):' | |||
|
518 | 521 | self.poller.unregister(self.socket) |
|
519 | 522 | self.socket.close() |
|
520 | 523 | self.socket = self.context.socket(zmq.REQ) |
|
521 | self.socket.setsockopt(zmq.LINGER, 0) | |
|
524 | self.socket.linger = 1000 | |
|
522 | 525 | self.socket.connect(self.address) |
|
523 | 526 | |
|
524 | 527 | self.poller.register(self.socket, zmq.POLLIN) |
@@ -53,6 +53,7 b' class Heartbeat(Thread):' | |||
|
53 | 53 | |
|
54 | 54 | def run(self): |
|
55 | 55 | self.socket = self.context.socket(zmq.REP) |
|
56 | self.socket.linger = 1000 | |
|
56 | 57 | c = ':' if self.transport == 'tcp' else '-' |
|
57 | 58 | self.socket.bind('%s://%s' % (self.transport, self.ip) + c + str(self.port)) |
|
58 | 59 | while True: |
@@ -298,18 +298,22 b' class IPKernelApp(BaseIPythonApplication, InteractiveShellApp):' | |||
|
298 | 298 | # atexit.register(context.term) |
|
299 | 299 | |
|
300 | 300 | self.shell_socket = context.socket(zmq.ROUTER) |
|
301 | self.shell_socket.linger = 1000 | |
|
301 | 302 | self.shell_port = self._bind_socket(self.shell_socket, self.shell_port) |
|
302 | 303 | self.log.debug("shell ROUTER Channel on port: %i" % self.shell_port) |
|
303 | 304 | |
|
304 | 305 | self.iopub_socket = context.socket(zmq.PUB) |
|
306 | self.iopub_socket.linger = 1000 | |
|
305 | 307 | self.iopub_port = self._bind_socket(self.iopub_socket, self.iopub_port) |
|
306 | 308 | self.log.debug("iopub PUB Channel on port: %i" % self.iopub_port) |
|
307 | 309 | |
|
308 | 310 | self.stdin_socket = context.socket(zmq.ROUTER) |
|
311 | self.stdin_socket.linger = 1000 | |
|
309 | 312 | self.stdin_port = self._bind_socket(self.stdin_socket, self.stdin_port) |
|
310 | 313 | self.log.debug("stdin ROUTER Channel on port: %i" % self.stdin_port) |
|
311 | 314 | |
|
312 | 315 | self.control_socket = context.socket(zmq.ROUTER) |
|
316 | self.control_socket.linger = 1000 | |
|
313 | 317 | self.control_port = self._bind_socket(self.control_socket, self.control_port) |
|
314 | 318 | self.log.debug("control ROUTER Channel on port: %i" % self.control_port) |
|
315 | 319 |
General Comments 0
You need to be logged in to leave comments.
Login now