Use included platform detection method
This commit is contained in:
parent
79abe93139
commit
7e9998b4fd
@ -42,7 +42,7 @@ class HDLC():
|
|||||||
|
|
||||||
class ThreadingTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
|
class ThreadingTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
|
||||||
def server_bind(self):
|
def server_bind(self):
|
||||||
if sys.platform == 'win32':
|
if RNS.vendor.platformutils.is_windows():
|
||||||
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_EXCLUSIVEADDRUSE, 1)
|
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_EXCLUSIVEADDRUSE, 1)
|
||||||
else:
|
else:
|
||||||
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user