server_estab: don't try to send to a dead client

If the zlib setup fails the client will be exited, so don't send
to it before checking this.
This commit is contained in:
Simon Arlott 2016-11-20 21:41:18 +00:00
parent aaf6039eea
commit 65b9b1d06d
No known key found for this signature in database
GPG key ID: C8975F2043CA5D24

View file

@ -818,13 +818,14 @@ server_estab(struct Client *client_p)
{
start_zlib_session(client_p);
}
sendto_one(client_p, "SVINFO %d %d 0 :%ld", TS_CURRENT, TS_MIN, (long int)rb_current_time());
client_p->servptr = &me;
if(IsAnyDead(client_p))
return CLIENT_EXITED;
sendto_one(client_p, "SVINFO %d %d 0 :%ld", TS_CURRENT, TS_MIN, (long int)rb_current_time());
SetServer(client_p);
rb_dlinkAdd(client_p, &client_p->lnode, &me.serv->servers);