mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 14:51:11 +01:00
bugfix: in some cases, connection_mark_for_close wasn't marking the conn
svn:r1174
This commit is contained in:
parent
3fb9c869a8
commit
ae67c48805
1 changed files with 3 additions and 2 deletions
|
@ -160,6 +160,7 @@ void connection_close_immediate(connection_t *conn)
|
||||||
int
|
int
|
||||||
_connection_mark_for_close(connection_t *conn, char reason)
|
_connection_mark_for_close(connection_t *conn, char reason)
|
||||||
{
|
{
|
||||||
|
int retval = 0;
|
||||||
assert_connection_ok(conn,0);
|
assert_connection_ok(conn,0);
|
||||||
|
|
||||||
if (conn->marked_for_close) {
|
if (conn->marked_for_close) {
|
||||||
|
@ -185,7 +186,7 @@ _connection_mark_for_close(connection_t *conn, char reason)
|
||||||
connection_dns_remove(conn);
|
connection_dns_remove(conn);
|
||||||
if (!conn->has_sent_end && reason &&
|
if (!conn->has_sent_end && reason &&
|
||||||
connection_edge_end(conn, reason, conn->cpath_layer) < 0)
|
connection_edge_end(conn, reason, conn->cpath_layer) < 0)
|
||||||
return -1;
|
retval = -1;
|
||||||
break;
|
break;
|
||||||
case CONN_TYPE_DNSWORKER:
|
case CONN_TYPE_DNSWORKER:
|
||||||
if (conn->state == DNSWORKER_STATE_BUSY) {
|
if (conn->state == DNSWORKER_STATE_BUSY) {
|
||||||
|
@ -197,7 +198,7 @@ _connection_mark_for_close(connection_t *conn, char reason)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
conn->marked_for_close = 1;
|
conn->marked_for_close = 1;
|
||||||
return 0;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
int connection_create_listener(char *bindaddress, uint16_t bindport, int type) {
|
int connection_create_listener(char *bindaddress, uint16_t bindport, int type) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue