Skip to content

Commit

Permalink
🔊 Improve log messages in Live
Browse files Browse the repository at this point in the history
  • Loading branch information
leolabs committed Feb 26, 2023
1 parent f9eba57 commit f7f5ab5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion midi-script/Socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def bind(self, try_stored=False):
self.send("connect", {"port": port})
self.show_message("Started server on port " + str(port))

self.log_message('Starting on: ' + str(self._socket.getsockname()) +
self.log_message('Started on: ' + str(self._socket.getsockname()) +
', remote addr: ' + str(self._client_addr))
except Exception as e:
msg = 'ERROR: Cannot bind to ' + \
Expand Down Expand Up @@ -148,6 +148,8 @@ def jsonReplace(o):
{"event": name, "data": obj, "uuid": uuid}, default=jsonReplace, ensure_ascii=False))
except socket.error as e:
self.log_message("Socket error: " + str(e.args))
self.log_message("Server: " + str(self._server_addr) +
", client: " + str(self._client_addr))
self.log_message("Restarting socket...")
self._socket.close()
self.init_socket()
Expand Down

0 comments on commit f7f5ab5

Please sign in to comment.