Skip to content

Commit dc3287e

Browse files
author
Francesco Mecatti
committed
Close connection stability
1 parent 06c87de commit dc3287e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server.py

+2
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ def handle(self):
3030

3131
if cmd == 'u' or cmd == 'U':
3232
filename = protocol_handler.get_input("Filename: ")
33+
if not filename;ì: break
3334
logging.info(f"Upload request from {self.client_address}. File: {filename}")
3435
file_handler.upload(filename)
3536
elif cmd == 'd' or cmd == 'D':
3637
filename = protocol_handler.get_input("Filename: ")
38+
if not filename: break
3739
logging.info(f"Download request from {self.client_address}. File: {filename}")
3840
file_handler.download(filename)
3941
elif cmd == 'l' or cmd == 'L':

0 commit comments

Comments
 (0)