diff options
Diffstat (limited to 'src/send.c')
-rw-r--r-- | src/send.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -194,6 +194,8 @@ void sendq_unblocked(fde_t *fd, struct Client *client_p) { assert(fd == &client_p->localClient->fd); + + DelFlag(client_p, FLAGS_BLOCKED); send_queued_write(client_p); } @@ -213,7 +215,7 @@ send_queued_write(struct Client *to) ** Once socket is marked dead, we cannot start writing to it, ** even if the error is removed... */ - if (IsDead(to)) + if (IsDead(to) || HasFlag(to, FLAGS_BLOCKED)) return; /* no use calling send() now */ /* Next, lets try to write some data */ @@ -263,6 +265,7 @@ send_queued_write(struct Client *to) if ((retlen < 0) && (ignoreErrno(errno))) { + AddFlag(to, FLAGS_BLOCKED); /* we have a non-fatal error, reschedule a write */ comm_setselect(&to->localClient->fd, COMM_SELECT_WRITE, (PF *)sendq_unblocked, to, 0); |