Skip to content

Commit fb78aca

Browse files
author
Francesco Mecatti
committed
Removed size check
1 parent 2455568 commit fb78aca

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ProtocolImplementation/ServerProtocolImplementation/ServerProtocol.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@ def close_connection(self):
1818
def get_input(self, text):
1919
self.status_handler.input()
2020
self.s.sendall(text.encode())
21-
if not self.status_handler.is_code("OK", self.s.recv(CODEBYTES)):
21+
data = self.s.recv(CODEBYTES)
22+
logging.debug(data)
23+
if not self.status_handler.is_code("OK", data):
2224
raise ConnectionError("Client not confirming")
2325

24-
if not self.status_handler.is_code("Response", self.s.recv(CODEBYTES)):
26+
data = self.s.recv(CODEBYTES)
27+
logging.debug(data)
28+
if not self.status_handler.is_code("Response", data):
2529
raise ConnectionError("Client not responding")
2630
data = self.s.recv(BUFFSIZENUM).decode().strip()
2731
if not data:
@@ -65,8 +69,6 @@ def get_file(self, file: BinaryIO, filename):
6569
logging.info("File received")
6670
self.status_handler.ok()
6771
self.status_handler.end()
68-
while not self.s.recv(BUFFSIZENUM):
69-
pass
7072

7173
def send_file(self, file, filename):
7274
self.status_handler.ok()

0 commit comments

Comments
 (0)