Stop connection loop when closed
This commit is contained in:
parent
1c86a6c58a
commit
a7de4aca91
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue