mirror of
https://github.com/curl/curl.git
synced 2025-09-16 17:12:43 +03:00
parent
5f8351aea3
commit
00ea0aaf46
|
@ -66,9 +66,9 @@ def telnetserver(options):
|
||||||
|
|
||||||
# Need to set the allow_reuse on the class, not on the instance.
|
# Need to set the allow_reuse on the class, not on the instance.
|
||||||
socketserver.TCPServer.allow_reuse_address = True
|
socketserver.TCPServer.allow_reuse_address = True
|
||||||
server = socketserver.TCPServer(local_bind, NegotiatingTelnetHandler)
|
with socketserver.TCPServer(local_bind, NegotiatingTelnetHandler) as server:
|
||||||
server.serve_forever()
|
server.serve_forever()
|
||||||
|
# leaving `with` calls server.close() automatically
|
||||||
return ScriptRC.SUCCESS
|
return ScriptRC.SUCCESS
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user