common: Increase timeout for socket_send() to reasonable value The short timeout of 1000 ms might cause problems in different situations like a firmware restore, where 1000 ms can easily be hit. Increasing this to a higher value will mitigate it for this case, but actually the error handling at a higher level needs to be improved.
diff --git a/common/socket.c b/common/socket.c index fd89c56..47c0903 100644 --- a/common/socket.c +++ b/common/socket.c
@@ -51,6 +51,7 @@ #include "socket.h" #define RECV_TIMEOUT 20000 +#define SEND_TIMEOUT 10000 #define CONNECT_TIMEOUT 5000 #ifndef EAFNOSUPPORT @@ -852,7 +853,7 @@ int socket_send(int fd, void *data, size_t length) { int flags = 0; - int res = socket_check_fd(fd, FDM_WRITE, 1000); + int res = socket_check_fd(fd, FDM_WRITE, SEND_TIMEOUT); if (res <= 0) { return res; }