Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Closing of connections has to happen in main function.
  • Loading branch information
brianmay committed Jun 7, 2011
1 parent 0316c53 commit 94cadd9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions server.py
Expand Up @@ -271,9 +271,8 @@ def udp_req(channel, cmd, data):
elif cmd == ssnet.CMD_UDP_CLOSE:
debug2('is incoming UDP close\n')
h = udphandlers[channel]
h.sock.close()
h.ok = False
del mux.channels[channel]
del udphandlers[channel]

def udp_open(channel, data):
debug2('Incoming UDP open.\n')
Expand Down Expand Up @@ -308,3 +307,9 @@ def udp_open(channel, data):
del dnshandlers[channel]
h.sock.close()
h.ok = False
for channel,h in udphandlers.items():
if not h.ok:
debug3('expiring UDP channel=%d\n' % channel)
del udphandlers[channel]
h.sock.close()
h.ok = False

0 comments on commit 94cadd9

Please sign in to comment.