mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Allow socket address reuse; fixed #1264
The socket may remain in the TIME_WAIT state for some time after the server shuts down, which prevents another instance of the server from listening on the same port. This change allows the server to reuse the address even when it's still waiting.
This commit is contained in:
parent
826ff4df50
commit
1b6f081619
1 changed files with 1 additions and 0 deletions
|
|
@ -36,6 +36,7 @@ class ComplexHTTPRequestHandler(srvmod.SimpleHTTPRequestHandler):
|
|||
|
||||
Handler = ComplexHTTPRequestHandler
|
||||
|
||||
socketserver.TCPServer.allow_reuse_address = True
|
||||
try:
|
||||
httpd = socketserver.TCPServer(("", PORT), Handler)
|
||||
except OSError as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue