summaryrefslogtreecommitdiffstats
path: root/common/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/socket.c')
-rw-r--r--common/socket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/socket.c b/common/socket.c
index cf6e9eb..a47de2a 100644
--- a/common/socket.c
+++ b/common/socket.c
@@ -690,6 +690,10 @@ int socket_receive_timeout(int fd, void *data, size_t length, int flags,
int socket_send(int fd, void *data, size_t length)
{
int flags = 0;
+ int res = socket_check_fd(fd, FDM_WRITE, 1000);
+ if (res <= 0) {
+ return res;
+ }
#ifdef MSG_NOSIGNAL
flags |= MSG_NOSIGNAL;
#endif