correction
This commit is contained in:
parent
9bb91f6b36
commit
27cd34857a
@ -67,7 +67,7 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
|
|||||||
print("Could not commit")
|
print("Could not commit")
|
||||||
mydb.close()
|
mydb.close()
|
||||||
# just send back the same data, but upper-cased
|
# just send back the same data, but upper-cased
|
||||||
self.request.sendall("Done")
|
self.request.send("Done")
|
||||||
|
|
||||||
|
|
||||||
class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
|
class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
|
||||||
@ -78,7 +78,6 @@ if __name__ == "__main__":
|
|||||||
HOST, PORT = "", 24048
|
HOST, PORT = "", 24048
|
||||||
|
|
||||||
server = ThreadedTCPServer((HOST, PORT), ThreadedTCPRequestHandler)
|
server = ThreadedTCPServer((HOST, PORT), ThreadedTCPRequestHandler)
|
||||||
ip, port = server.server_address
|
|
||||||
|
|
||||||
# Start a thread with the server -- that thread will then start one
|
# Start a thread with the server -- that thread will then start one
|
||||||
# more thread for each request
|
# more thread for each request
|
||||||
|
Loading…
x
Reference in New Issue
Block a user