mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
don't connection_edge_end() on eof if we're already marked for close,
because if we are then it's because we already got an end. svn:r3223
This commit is contained in:
parent
ebdfaaf477
commit
3a572fcffa
@ -40,10 +40,10 @@ int connection_edge_reached_eof(connection_t *conn) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
log_fn(LOG_INFO,"conn (fd %d) reached eof (stream size %d). Closing.", conn->s, (int)conn->stream_size);
|
log_fn(LOG_INFO,"conn (fd %d) reached eof (stream size %d). Closing.", conn->s, (int)conn->stream_size);
|
||||||
connection_edge_end(conn, END_STREAM_REASON_DONE, conn->cpath_layer);
|
|
||||||
if (!conn->marked_for_close) {
|
if (!conn->marked_for_close) {
|
||||||
/* only mark it if not already marked. it's possible to
|
/* only mark it if not already marked. it's possible to
|
||||||
* get the 'end' right around when the client hangs up on us. */
|
* get the 'end' right around when the client hangs up on us. */
|
||||||
|
connection_edge_end(conn, END_STREAM_REASON_DONE, conn->cpath_layer);
|
||||||
connection_mark_for_close(conn);
|
connection_mark_for_close(conn);
|
||||||
conn->hold_open_until_flushed = 1; /* just because we shouldn't read
|
conn->hold_open_until_flushed = 1; /* just because we shouldn't read
|
||||||
doesn't mean we shouldn't write */
|
doesn't mean we shouldn't write */
|
||||||
|
Loading…
Reference in New Issue
Block a user