summaryrefslogtreecommitdiff
path: root/src/network/core/tcp_http.cpp
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-04-27 10:50:28 +0200
committerCharles Pigott <charlespigott@googlemail.com>2021-04-27 18:17:34 +0100
commit65c5a647191a9a10a532bb9d67da6938f5eace1b (patch)
tree0a2444886e56ad63583dae0e4e8f5a632a63199d /src/network/core/tcp_http.cpp
parenta934dfe0be9621b784ccd1dca81d2ef8214fc4e0 (diff)
downloadopenttd-65c5a647191a9a10a532bb9d67da6938f5eace1b.tar.xz
Fix: [Network] errno and strerror do not handle network errors on Windows
Diffstat (limited to 'src/network/core/tcp_http.cpp')
-rw-r--r--src/network/core/tcp_http.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/core/tcp_http.cpp b/src/network/core/tcp_http.cpp
index d88ea711d..04bc6a03a 100644
--- a/src/network/core/tcp_http.cpp
+++ b/src/network/core/tcp_http.cpp
@@ -228,7 +228,7 @@ int NetworkHTTPSocketHandler::Receive()
for (;;) {
ssize_t res = recv(this->sock, (char *)this->recv_buffer + this->recv_pos, lengthof(this->recv_buffer) - this->recv_pos, 0);
if (res == -1) {
- int err = GET_LAST_ERROR();
+ int err = NetworkGetLastError();
if (err != EWOULDBLOCK) {
/* Something went wrong... (104 is connection reset by peer) */
if (err != 104) DEBUG(net, 0, "recv failed with error %d", err);