File tree 1 file changed +5
-3
lines changed
Python_chatting_application
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):
23
23
print (f"Disconnected with f{ nick } " )
24
24
break
25
25
BroadCasating (reply )
26
- except :
26
+ except Exception :
27
27
index_of_cli = clients .index (cli )
28
28
print (index_of_cli )
29
29
nick = nickename [index_of_cli ]
@@ -38,6 +38,7 @@ def BroadCasating(msg):
38
38
for client in clients :
39
39
client .send (bytes (msg , "utf-8" ))
40
40
41
+
41
42
def recieve ():
42
43
while True :
43
44
client_sckt , addr = s .accept ()
@@ -48,7 +49,8 @@ def recieve():
48
49
clients .append (client_sckt )
49
50
print (f"{ nick } has joined the chat room " )
50
51
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
+
52
54
53
55
recieve ()
54
- s .close ()
56
+ s .close ()
You can’t perform that action at this time.
0 commit comments