Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

Commit

Permalink
Use SO_REUSEADDR to fix #12
Browse files Browse the repository at this point in the history
  • Loading branch information
jalmeroth committed Oct 4, 2019
1 parent 1a446a6 commit e24a9bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pymusiccast/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def initialize_socket(self):
self._socket = socket.socket(
socket.AF_INET, socket.SOCK_DGRAM # IPv4 # UDP
)
self._socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
self._socket.bind(("", self._udp_port))
except socket.error as err:
raise err
Expand Down

0 comments on commit e24a9bb

Please sign in to comment.