clean socket shutdown (fix multiprocessing)

This commit is contained in:
ed
2019-07-02 23:36:16 +00:00
parent 3794aa7ac7
commit 0cfda684ce
4 changed files with 10 additions and 4 deletions
+2
View File
@@ -3,6 +3,7 @@ from __future__ import print_function, unicode_literals
import os
import time
import socket
import threading
from .__init__ import E
@@ -68,6 +69,7 @@ class HttpSrv(object):
finally:
self.log(str(addr), "-" * 7 + "C-done")
sck.shutdown(socket.SHUT_RDWR)
sck.close()
with self.mutex:
del self.clients[cli]