Exception with socket error message in getResponse, instead of single static message.

This commit is contained in:
skl131313 2018-01-27 08:37:19 -05:00
parent a40ba7d20d
commit 48bce9f2f4
1 changed files with 1 additions and 1 deletions

View File

@ -244,7 +244,7 @@ AutocompleteResponse getResponse(Socket socket)
ubyte[1024 * 24] buffer;
auto bytesReceived = socket.receive(buffer);
if (bytesReceived == Socket.ERROR)
throw new Exception("Incorrect number of bytes received");
throw new Exception(lastSocketError);
if (bytesReceived == 0)
throw new Exception("Server closed the connection, 0 bytes received");
AutocompleteResponse response;