]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Set reason_for_closing when erroring out of channel_tls_connect()
authorAndrea Shepard <andrea@torproject.org>
Tue, 9 Oct 2012 17:51:10 +0000 (10:51 -0700)
committerAndrea Shepard <andrea@torproject.org>
Wed, 10 Oct 2012 06:19:53 +0000 (23:19 -0700)
src/or/channeltls.c

index 93e06364de527a42bbfabb603162e08fcddb941a..339663e00a6ef4458f037e861c3fd948e94174af 100644 (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;
   }