]> code.delx.au - monosys/commitdiff
Ensure both connections are always closed
authorJames Bunton <jamesbunton@delx.net.au>
Wed, 28 Dec 2011 10:01:05 +0000 (21:01 +1100)
committerJames Bunton <jamesbunton@delx.net.au>
Wed, 28 Dec 2011 10:01:05 +0000 (21:01 +1100)
scripts/proxy.py

index 6a0739671657e293cb342b8e88832efcca425484..66220ef12ae243bea888a8915454ed91fbd8e1f5 100755 (executable)
@@ -164,6 +164,8 @@ class Proxy(asyncore.dispatcher):
                        return
                print >>sys.stderr, "Proxy closed"
                self.close()
+               if len(self.other.buffer) == 0:
+                       self.other.close()
                self.other.end = True
                self.other = None