Treat EOF as expected if self.quit
znc doesn't seem to respond to QUIT with ERROR like an IRCd would.master
parent
e84c36a0bd
commit
a7681579fa
6
irc.c
6
irc.c
|
@ -131,7 +131,11 @@ retry:
|
||||||
read = tls_read(client, &buf[len], sizeof(buf) - len);
|
read = tls_read(client, &buf[len], sizeof(buf) - len);
|
||||||
if (read == TLS_WANT_POLLIN || read == TLS_WANT_POLLOUT) goto retry;
|
if (read == TLS_WANT_POLLIN || read == TLS_WANT_POLLOUT) goto retry;
|
||||||
if (read < 0) errx(EX_IOERR, "tls_read: %s", tls_error(client));
|
if (read < 0) errx(EX_IOERR, "tls_read: %s", tls_error(client));
|
||||||
if (!read) errx(EX_PROTOCOL, "unexpected eof");
|
if (!read) {
|
||||||
|
if (!self.quit) errx(EX_PROTOCOL, "unexpected eof");
|
||||||
|
uiExit();
|
||||||
|
exit(EX_OK);
|
||||||
|
}
|
||||||
len += read;
|
len += read;
|
||||||
|
|
||||||
char *crlf;
|
char *crlf;
|
||||||
|
|
Loading…
Reference in New Issue