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 50b1e5987c
commit f41f79971c
No known key found for this signature in database
GPG key ID: C8975F2043CA5D24

View file

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