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
}
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;
}
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--;
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--;
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);
}