Set reason_for_closing when erroring out of channel_tls_connect()

This commit is contained in:
Andrea Shepard 2012-10-09 10:51:10 -07:00
parent 3f4b95b1a3
commit 53454fad95

View File

@ -133,6 +133,7 @@ channel_tls_connect(const tor_addr_t *addr, uint16_t port,
tlschan->conn = connection_or_connect(addr, port, id_digest, tlschan);
/* connection_or_connect() will fill in tlschan->conn */
if (!(tlschan->conn)) {
chan->reason_for_closing = CHANNEL_CLOSE_FOR_ERROR;
channel_change_state(chan, CHANNEL_STATE_ERROR);
goto err;
}