Only set IPC with write buffer if set

This commit is contained in:
Mike Place 2016-07-19 13:24:25 -06:00
parent b2d636017d
commit 35a845fff5

View file

@ -507,13 +507,18 @@ class IPCMessagePublisher(object):
def handle_connection(self, connection, address):
log.trace('IPCServer: Handling connection to address: {0}'.format(address))
log.trace('IPCPublisher write buffer set to: {0}'.format(self.opts['ipc_write_buffer']))
try:
stream = IOStream(
connection,
io_loop=self.io_loop,
max_write_buffer_size=self.opts['ipc_write_buffer']
)
if self.opts['ipc_write_buffer']:
stream = IOStream(
connection,
io_loop=self.io_loop,
max_write_buffer_size=self.opts['ipc_write_buffer']
)
else:
stream = IOStream(
connection,
io_loop=self.io_loop
)
self.streams.add(stream)
except Exception as exc:
log.error('IPC streaming error: {0}'.format(exc))