mirror of
https://gitlab.vegova.si/rkv/flex-discovery-proxy.git
synced 2025-05-31 08:49:08 +00:00
Add shebang and handle client
disconnection errors
This commit is contained in:
parent
455a409e0b
commit
544d5dd265
@ -1,3 +1,5 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
######################################################
|
||||
# FlexRadio discovery Proxy CLIENT
|
||||
######################################################
|
||||
|
@ -1,3 +1,5 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
######################################################
|
||||
# FlexRadio discovery Proxy
|
||||
######################################################
|
||||
@ -59,9 +61,12 @@ try:
|
||||
data = None
|
||||
if not data:
|
||||
# A client socket has been disconnected
|
||||
print("Client disconnected:", s.getpeername())
|
||||
try:
|
||||
print("Client disconnected:", s.getpeername())
|
||||
s.close()
|
||||
except:
|
||||
print("Client disconnected")
|
||||
clients.remove(s)
|
||||
s.close()
|
||||
except KeyboardInterrupt:
|
||||
print("\nExiting...")
|
||||
for s in clients:
|
||||
|
Loading…
x
Reference in New Issue
Block a user