Skip to content

Commit

Permalink
Convert sbs message to bytes before sending
Browse files Browse the repository at this point in the history
  • Loading branch information
Jared Dulmage committed May 6, 2020
1 parent 5f7c6f5 commit 6614f6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/sbs1.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ def output(self, msg):
try:
sbs1_msg = self.parse(msg)
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
conn.send(sbs1_msg)
conn.send(sbs1_bytes)
except socket.error:
self._conns.remove(conn)
print("Connections: ", len(self._conns))
Expand Down

0 comments on commit 6614f6c

Please sign in to comment.