Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Sep 7, 2016
1 parent 48fb72c commit 7976f45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ class GWSNetProtocol(basic.LineReceiver):
def connectionMade(self):
print("Client connected", file=stderr)
self.factory.connections += 1
if self.factory.connections != 1:
if self.factory.connections < 1:
print("Losing last connection",self.factory.connections,file=sys.stderr)
self.transport.loseConnection()
else:
self.sendLine(b("READY"))
Expand Down

0 comments on commit 7976f45

Please sign in to comment.