diff options
author | Roger Dingledine <arma@torproject.org> | 2004-04-25 22:48:47 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-04-25 22:48:47 +0000 |
commit | 9e5d2ad91ce7fbf037eab50265cd994880c98221 (patch) | |
tree | 5d27ae8beabf8b070c8eaf3daf50b5848a528227 | |
parent | f9418c05bb4ee82f442bb084909c93cf065bdc85 (diff) | |
download | tor-9e5d2ad91ce7fbf037eab50265cd994880c98221.tar.gz tor-9e5d2ad91ce7fbf037eab50265cd994880c98221.zip |
don't crash, if a conn that sent a begin has suddenly lost its circuit
svn:r1704
-rw-r--r-- | src/or/connection_edge.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 4d67b4ea71..46e94acc8b 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -620,6 +620,11 @@ void connection_ap_expire_beginning(void) { continue; conn->num_retries++; circ = circuit_get_by_conn(conn); + if(!circ) { /* it's vanished? */ + log_fn(LOG_INFO,"Conn is in connect-wait, but lost its circ."); + connection_mark_for_close(conn,0); + continue; + } if(circ->purpose == CIRCUIT_PURPOSE_C_REND_JOINED) { if (now - conn->timestamp_lastread > 45) { log_fn(LOG_WARN,"Rend stream is %d seconds late. Giving up.", |