From 2ae356a1bbbcff55cb79c70cdc9058f282cd979e Mon Sep 17 00:00:00 2001 From: Max Lv Date: Fri, 9 Sep 2016 08:56:06 +0800 Subject: [PATCH] Fix error handling when parsing the header --- src/local.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/local.c b/src/local.c index f3f2c229..808efd2e 100644 --- a/src/local.c +++ b/src/local.c @@ -548,7 +548,7 @@ static void server_recv_cb(EV_P_ ev_io *w, int revents) else if (p == tls_protocol->default_port) ret = tls_protocol->parse_packet(buf->array + 3 + abuf->len, buf->len - 3 - abuf->len, &hostname); - if (ret == -1 || ret == -2) { + if (ret == -1) { server->stage = 2; bfree(abuf); return;