send: fix infinite recursion in _send_linebuf
A netwide snote eventually calls into this function again with the same server as has already been determined is over its sendq. Mark the link dead before sending the snote to avoid infinite recursion.
This commit is contained in:
parent
31f9d9b2f3
commit
6638c837cc
1 changed files with 2 additions and 1 deletions
|
@ -70,6 +70,8 @@ _send_linebuf(struct Client *to, buf_head_t *linebuf)
|
||||||
|
|
||||||
if(rb_linebuf_len(&to->localClient->buf_sendq) > get_sendq(to))
|
if(rb_linebuf_len(&to->localClient->buf_sendq) > get_sendq(to))
|
||||||
{
|
{
|
||||||
|
dead_link(to, 1);
|
||||||
|
|
||||||
if(IsServer(to))
|
if(IsServer(to))
|
||||||
{
|
{
|
||||||
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
|
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
|
||||||
|
@ -84,7 +86,6 @@ _send_linebuf(struct Client *to, buf_head_t *linebuf)
|
||||||
get_sendq(to));
|
get_sendq(to));
|
||||||
}
|
}
|
||||||
|
|
||||||
dead_link(to, 1);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue