correction

master
ademant 2019-06-25 15:04:56 +02:00
parent 9bb91f6b36
commit 27cd34857a
1 changed files with 1 additions and 2 deletions

View File

@ -67,7 +67,7 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
print("Could not commit")
mydb.close()
# just send back the same data, but upper-cased
self.request.sendall("Done")
self.request.send("Done")
class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
@ -78,7 +78,6 @@ if __name__ == "__main__":
HOST, PORT = "", 24048
server = ThreadedTCPServer((HOST, PORT), ThreadedTCPRequestHandler)
ip, port = server.server_address
# Start a thread with the server -- that thread will then start one
# more thread for each request