Exit on zero read

This commit is contained in:
Curtis McEnroe 2018-08-04 01:38:43 -04:00
父節點 fc5bf09c46
當前提交 c6cd59f5c8
沒有發現已知的金鑰在資料庫的簽署中
GPG 金鑰 ID: CEA2F97ADCFCD77C

5
chat.c
查看文件

@ -460,6 +460,11 @@ static void clientRead(void) {
ssize_t size = tls_read(client.tls, buf + fill, sizeof(buf) - fill);
if (size < 0) errx(EX_IOERR, "tls_read: %s", tls_error(client.tls));
if (!size) {
// FIXME: Always endwin
endwin();
exit(EX_OK);
}
fill += size;
char *end, *line = buf;