Fix error handling when parsing the header

This commit is contained in:
Max Lv
2016-09-09 08:56:06 +08:00
parent 6af6417b19
commit 2ae356a1bb
+1 -1
View File
@@ -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;