dcd.common.messages: Fix spurious "Could not unpack the response" errors (#573)

dcd.common.messages: Fix spurious "Could not unpack the response" errors
merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
This commit is contained in:
Vladimir Panteleev 2019-01-08 03:26:57 +02:00 committed by The Dlang Bot
parent 5b9780562a
commit 0f998365eb
1 changed files with 1 additions and 1 deletions

View File

@ -220,7 +220,7 @@ AutocompleteResponse getResponse(Socket socket)
if (bytesReceived == 0)
break;
unpacker.feed(buffer[0..bytesReceived]);
} while (bytesReceived == buffer.length);
} while (true);
if (unpacker.size == 0)
throw new Exception("Server closed the connection, 0 bytes received");