This commit is contained in:
Viktor Söderqvist 2024-04-18 10:32:23 +01:00 committed by GitHub
commit 266ef30259
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 3 deletions

View File

@ -183,9 +183,7 @@ static int connSocketAccept(connection *conn, ConnectionCallbackFunc accept_hand
if (conn->state != CONN_STATE_ACCEPTING) return C_ERR;
conn->state = CONN_STATE_CONNECTED;
connIncrRefs(conn);
if (!callHandler(conn, accept_handler)) ret = C_ERR;
connDecrRefs(conn);
return ret;
}

View File

@ -563,7 +563,7 @@ static int updateStateAfterSSLIO(tls_connection *conn, int ret_value, int update
if (ssl_err == SSL_ERROR_ZERO_RETURN ||
((ssl_err == SSL_ERROR_SYSCALL && !errno))) {
conn->c.state = CONN_STATE_CLOSED;
return -1;
return 0;
} else {
conn->c.state = CONN_STATE_ERROR;
return -1;