diff --git a/include/faabric/transport/tcp/Socket.h b/include/faabric/transport/tcp/Socket.h index 746b74cd5..93abcc0a6 100644 --- a/include/faabric/transport/tcp/Socket.h +++ b/include/faabric/transport/tcp/Socket.h @@ -5,7 +5,7 @@ namespace faabric::transport::tcp { -const int SocketTimeoutMs = 3000; +const int SocketTimeoutMs = 5000; class Socket { diff --git a/src/transport/tcp/SendSocket.cpp b/src/transport/tcp/SendSocket.cpp index ff92900a6..00b353f82 100644 --- a/src/transport/tcp/SendSocket.cpp +++ b/src/transport/tcp/SendSocket.cpp @@ -89,12 +89,22 @@ void SendSocket::sendOne(const uint8_t* buffer, size_t bufferSize) continue; }; #endif - SPDLOG_ERROR("Error error sending TCP message to {}:{} ({}/{}): {}", - host, - port, - totalNumSent, - bufferSize, - std::strerror(errno)); + if (errno == EAGAIN || errno == EWOULDBLOCK) { + SPDLOG_ERROR( + "Error sending TCP message to {}:{} ({}/{}: timed-out)", + host, + port, + totalNumSent, + bufferSize); + } else { + SPDLOG_ERROR("Error sending TCP message to {}:{} ({}/{}): {}", + host, + port, + totalNumSent, + bufferSize, + std::strerror(errno)); + } + throw std::runtime_error("Error sending TCP message!"); }