mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Fix socket accounting with ORConn sockets.
When we close a socket via tor_tls_free(), we previously had no way for our socket accounting logic to learn about it. This meant that the socket accounting code would think we had run out of sockets, and freak out. Fixes bug 27795; bugfix on 0.3.5.1-alpha.
This commit is contained in:
@@ -646,6 +646,7 @@ connection_free_minimal(connection_t *conn)
|
||||
} else {
|
||||
/* The tor_tls_free() call below will close the socket; we must tell
|
||||
* the code below not to close it a second time. */
|
||||
tor_release_socket_ownership(conn->s);
|
||||
conn->s = TOR_INVALID_SOCKET;
|
||||
}
|
||||
tor_tls_free(or_conn->tls);
|
||||
|
||||
Reference in New Issue
Block a user