Convert sbs message to bytes before sending
This commit is contained in:
parent
5f7c6f57c8
commit
6614f6ce43
@ -93,8 +93,9 @@ class output_sbs1:
|
|||||||
try:
|
try:
|
||||||
sbs1_msg = self.parse(msg)
|
sbs1_msg = self.parse(msg)
|
||||||
if sbs1_msg is not None:
|
if sbs1_msg is not None:
|
||||||
|
sbs1_bytes = sbs1_msg.encode('utf-8')
|
||||||
for conn in self._conns[:]: #iterate over a copy of the list
|
for conn in self._conns[:]: #iterate over a copy of the list
|
||||||
conn.send(sbs1_msg)
|
conn.send(sbs1_bytes)
|
||||||
except socket.error:
|
except socket.error:
|
||||||
self._conns.remove(conn)
|
self._conns.remove(conn)
|
||||||
print("Connections: ", len(self._conns))
|
print("Connections: ", len(self._conns))
|
||||||
|
Loading…
Reference in New Issue
Block a user