File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Python_chatting_application Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ def Client_Handler(cli):
2323 print (f"Disconnected with f{ nick } " )
2424 break
2525 BroadCasating (reply )
26- except :
26+ except Exception :
2727 index_of_cli = clients .index (cli )
2828 print (index_of_cli )
2929 nick = nickename [index_of_cli ]
@@ -38,6 +38,7 @@ def BroadCasating(msg):
3838 for client in clients :
3939 client .send (bytes (msg , "utf-8" ))
4040
41+
4142def recieve ():
4243 while True :
4344 client_sckt , addr = s .accept ()
@@ -48,7 +49,8 @@ def recieve():
4849 clients .append (client_sckt )
4950 print (f"{ nick } has joined the chat room " )
5051 BroadCasating (f"{ nick } has joined the chat room say hi !!!" )
51- threading ._start_new_thread (Client_Handler , (client_sckt , ))
52+ threading ._start_new_thread (Client_Handler , (client_sckt ,))
53+
5254
5355recieve ()
54- s .close ()
56+ s .close ()
You can’t perform that action at this time.
0 commit comments