aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-02-01 00:37:16 +0000
committerRoger Dingledine <arma@torproject.org>2005-02-01 00:37:16 +0000
commit2e97593d259d4b86f1bc2acca4be7a96895f8633 (patch)
tree80862d2194423d8567e586d970abb73fc356632d /src/or/main.c
parente7e77d6d8e6bdbd77f74021917d612b514cc8fcf (diff)
downloadtor-2e97593d259d4b86f1bc2acca4be7a96895f8633.tar.gz
tor-2e97593d259d4b86f1bc2acca4be7a96895f8633.zip
define TOR_FRAGILE if you want tor to give you a core when
something goes wrong. this should only be used by people actively tracking bugs. svn:r3487
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index cd3768c5ee..20c6e34035 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -339,6 +339,9 @@ conn_read_callback(int fd, short event, void *_conn)
#ifndef MS_WINDOWS
log_fn(LOG_WARN,"Bug: unhandled error on read for %s connection (fd %d); removing",
CONN_TYPE_TO_STRING(conn->type), conn->s);
+#ifdef TOR_FRAGILE
+ tor_assert(0);
+#endif
#endif
connection_mark_for_close(conn);
}
@@ -366,6 +369,9 @@ static void conn_write_callback(int fd, short events, void *_conn)
/* this connection is broken. remove it. */
log_fn(LOG_WARN,"Bug: unhandled error on write for %s connection (fd %d); removing",
CONN_TYPE_TO_STRING(conn->type), conn->s);
+#ifdef TOR_FRAGILE
+ tor_assert(0);
+#endif
conn->has_sent_end = 1; /* otherwise we cry wolf about duplicate close */
/* XXX do we need a close-immediate here, so we don't try to flush? */
connection_mark_for_close(conn);