Only call _start_transmit when required; closes #165.
This commit is contained in:
parent
80a97fbc9b
commit
6db3588c93
|
@ -862,7 +862,9 @@ class Stream(BasicStream):
|
||||||
pkt = struct.pack(self.HEADER_FMT, msg.dst_id, msg.src_id,
|
pkt = struct.pack(self.HEADER_FMT, msg.dst_id, msg.src_id,
|
||||||
msg.auth_id, msg.handle, msg.reply_to or 0,
|
msg.auth_id, msg.handle, msg.reply_to or 0,
|
||||||
len(msg.data)) + msg.data
|
len(msg.data)) + msg.data
|
||||||
|
was_transmitting = len(self._output_buf)
|
||||||
self._output_buf.append(pkt)
|
self._output_buf.append(pkt)
|
||||||
|
if not was_transmitting:
|
||||||
self._router.broker._start_transmit(self)
|
self._router.broker._start_transmit(self)
|
||||||
|
|
||||||
def send(self, msg):
|
def send(self, msg):
|
||||||
|
|
Loading…
Reference in New Issue