Stop connection loop when closed

This commit is contained in:
shortcutme 2016-09-14 10:54:08 +02:00
parent 1c86a6c58a
commit a7de4aca91
1 changed files with 1 additions and 1 deletions

View File

@ -133,7 +133,7 @@ class Connection(object):
self.unpacker = msgpack.Unpacker() self.unpacker = msgpack.Unpacker()
try: try:
while True: while not self.closed:
buff = self.sock.recv(16 * 1024) buff = self.sock.recv(16 * 1024)
if not buff: if not buff:
break # Connection closed break # Connection closed