File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ def handle_request(socket_client, port):
2121 socket_client .close ()
2222 return
2323
24-
2524 req = socket_client .recv (2048 ).decode ()
2625
2726 if (req == '' ):
@@ -36,7 +35,6 @@ def handle_request(socket_client, port):
3635 signature = socket_client .recv (2048 )
3736 socket_client .send ("ok" .encode ())
3837 vote = socket_client .recv (2048 ).decode ()
39- socket_client .send ("ok" .encode ())
4038
4139 hash_vote = SHA256 .new (vote .encode ())
4240
@@ -62,6 +60,8 @@ def handle_request(socket_client, port):
6260
6361 except :
6462 print ("Assinatura inválida" )
63+
64+ socket_client .send ("ok" .encode ())
6565
6666
6767 elif (req == "get votes" ):
@@ -102,7 +102,7 @@ def server(port):
102102 break
103103
104104 socket_client , addr_client = server_socket .accept ()
105- print (f"Established connection with { addr_client } " )
105+ # print(f"Established connection with {addr_client}")
106106 Thread (target = handle_request , args = (socket_client , port )).start ()
107107
108108if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments