summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-04-15 11:41:24 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-04-15 11:41:24 +0000
commita67597944d9a667c10c2e845199bc14ed2b662fe (patch)
tree4659671511f3787758085256233a35fb178be957 /src
parent82750c14c81b5a63373107267cda4fa6de1c2ff9 (diff)
- Readded FLAGS_BLOCKED
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@3310 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'src')
-rw-r--r--src/s_bsd.c1
-rw-r--r--src/send.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/src/s_bsd.c b/src/s_bsd.c
index cace7a5..aee198c 100644
--- a/src/s_bsd.c
+++ b/src/s_bsd.c
@@ -173,6 +173,7 @@ close_connection(struct Client *client_p)
* even if it is marked as blocked (COMM_SELECT_READ handler is called
* before COMM_SELECT_WRITE). Let's try, nothing to lose.. -adx
*/
+ DelFlag(client_p, FLAGS_BLOCKED);
send_queued_write(client_p);
}
diff --git a/src/send.c b/src/send.c
index dd39735..d397d5d 100644
--- a/src/send.c
+++ b/src/send.c
@@ -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);