Commit 6c9d78b3 authored by Roger Dingledine's avatar Roger Dingledine
Browse files

stop asserting that computers always go forward in time

it's simply not true


svn:r1236
parent 1e5b7bc6
......@@ -870,10 +870,12 @@ void assert_connection_ok(connection_t *conn, time_t now)
assert_buf_ok(conn->outbuf);
}
#if 0 /* computers often go back in time; no way to know */
assert(!now || conn->timestamp_lastread <= now);
assert(!now || conn->timestamp_lastwritten <= now);
assert(conn->timestamp_created <= conn->timestamp_lastread);
assert(conn->timestamp_created <= conn->timestamp_lastwritten);
#endif
/* XXX Fix this; no longer so.*/
#if 0
......
......@@ -154,8 +154,9 @@ int connection_tls_start_handshake(connection_t *conn, int receiving) {
}
connection_start_reading(conn);
log_fn(LOG_DEBUG,"starting the handshake");
if(connection_tls_continue_handshake(conn) < 0)
if(connection_tls_continue_handshake(conn) < 0) {
return -1;
}
return 0;
}
......
......@@ -58,12 +58,12 @@ int connection_cpu_process_inbuf(connection_t *conn) {
assert(conn && conn->type == CONN_TYPE_CPUWORKER);
if(conn->inbuf_reached_eof) {
log_fn(LOG_WARN,"Read eof. Worker has died.");
log_fn(LOG_WARN,"Read eof. Worker died unexpectedly.");
if(conn->state != CPUWORKER_STATE_IDLE) {
/* the circ associated with this cpuworker will have to wait until
* it gets culled in run_connection_housekeeping(), since we have
* no way to find out which circ it was. */
log_fn(LOG_WARN,"...and leaving a circuit waiting. Oh well.");
log_fn(LOG_WARN,"...and it left a circuit queued; abandoning circ.");
num_cpuworkers_busy--;
}
num_cpuworkers--;
......
......@@ -353,7 +353,7 @@ int connection_dns_process_inbuf(connection_t *conn) {
assert(conn && conn->type == CONN_TYPE_DNSWORKER);
if(conn->inbuf_reached_eof) {
log_fn(LOG_WARN,"Read eof. Worker dying.");
log_fn(LOG_WARN,"Read eof. Worker died unexpectedly.");
if(conn->state == DNSWORKER_STATE_BUSY) {
dns_cancel_pending_resolve(conn->address);
num_dnsworkers_busy--;
......
......@@ -247,7 +247,7 @@ static void conn_close_if_marked(int i) {
retval = flush_buf_tls(conn->tls, conn->outbuf, &conn->outbuf_flushlen);
/* XXX actually, some non-zero results are maybe ok. which ones? */
} else
retval = -1;
retval = -1; /* never flush non-open broken tls connections */
} else {
retval = flush_buf(conn->s, conn->outbuf, &conn->outbuf_flushlen);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment