Make SocketReader return its buffer when told to exit

This commit is contained in:
Juhani Haverinen 2016-08-02 03:34:15 +03:00
parent c14310a010
commit 568b650acd
1 changed files with 2 additions and 1 deletions

View File

@ -105,7 +105,8 @@ def SocketReader(sock):
if command is not None:
if command == SocketReaderCommands.stop:
return
# Return the rest of data in buffer
return chunk
else:
raise CommandError('%s not recognised' % repr(command))