Use included platform detection method

This commit is contained in:
Mark Qvist 2023-05-03 12:21:57 +02:00
parent 79abe93139
commit 7e9998b4fd
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ class HDLC():
class ThreadingTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
def server_bind(self):
if sys.platform == 'win32':
if RNS.vendor.platformutils.is_windows():
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_EXCLUSIVEADDRUSE, 1)
else:
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)