Merge pull request #434 from skl131313/error-msg

Exception with socket error message in getResponse, instead of single…
merged-on-behalf-of: Jan Jurzitza <gh@webfreak.org>
This commit is contained in:
The Dlang Bot 2018-01-27 17:57:16 +01:00 committed by GitHub
commit 4947590b46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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