Skip to content

Commit

Permalink
🐛 Fix buffer size limit being too high on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
leolabs committed Feb 6, 2024
1 parent 316f510 commit 0c6bc7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions midi-script/Socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ def init_socket(self, try_stored=False):
self._socket.bind(self._server_addr)
port = self._socket.getsockname()[1]

# Get the chunk limit of the socket, minus 1 for the ordering byte
# Get the chunk limit of the socket, minus 100 for some headroom
self._chunk_limit = self._socket.getsockopt(
socket.SOL_SOCKET, socket.SO_SNDBUF) - 1
socket.SOL_SOCKET, socket.SO_SNDBUF) - 100

logger.info("Chunk limit: " + str(self._chunk_limit))

Expand Down

0 comments on commit 0c6bc7d

Please sign in to comment.