mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Merge remote-tracking branch 'andrea/bug6028'
This commit is contained in:
commit
4432fa40dd
4
changes/bug6028
Normal file
4
changes/bug6028
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Minor bugfixes:
|
||||||
|
- Make sure to set *socket_error in all error cases in
|
||||||
|
connection_connect(), so it can't produce a warning about errno being
|
||||||
|
zero from errno_to_orconn_end_reason(). Resolves ticket 6028.
|
@ -1336,6 +1336,7 @@ connection_connect(connection_t *conn, const char *address,
|
|||||||
|
|
||||||
if (get_n_open_sockets() >= get_options()->_ConnLimit-1) {
|
if (get_n_open_sockets() >= get_options()->_ConnLimit-1) {
|
||||||
warn_too_many_conns();
|
warn_too_many_conns();
|
||||||
|
*socket_error = ENOBUFS;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1428,8 +1429,11 @@ connection_connect(connection_t *conn, const char *address,
|
|||||||
escaped_safe_str_client(address),
|
escaped_safe_str_client(address),
|
||||||
port, inprogress?"in progress":"established", s);
|
port, inprogress?"in progress":"established", s);
|
||||||
conn->s = s;
|
conn->s = s;
|
||||||
if (connection_add_connecting(conn) < 0) /* no space, forget it */
|
if (connection_add_connecting(conn) < 0) {
|
||||||
|
/* no space, forget it */
|
||||||
|
*socket_error = ENOBUFS;
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
return inprogress ? 0 : 1;
|
return inprogress ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user