added a socket timeout to IRCServer socket objects.
This commit is contained in:
parent
2015b1971c
commit
978fc5a359
1 changed files with 1 additions and 0 deletions
|
@ -36,6 +36,7 @@ class Server(object):
|
|||
socket.SOCK_STREAM)
|
||||
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
|
||||
self.socket.settimeout(5.0)
|
||||
if self.tls:
|
||||
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
||||
self.socket = context.wrap_socket(self.socket)
|
||||
|
|
Loading…
Reference in a new issue