mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
conn: Properly close MetricsPort socket on EOF
Handle the EOF situation for a metrics connection. Furthermore, if we failed to fetch the data from the inbuf properly, mark the socket as closed because the caller, connection_process_inbuf(), assumes that we did so on error. Fixes #40257 Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
committed by
Nick Mathewson
parent
f420eacf18
commit
01c4abc2d4
@@ -5242,6 +5242,8 @@ connection_reached_eof(connection_t *conn)
|
||||
return connection_dir_reached_eof(TO_DIR_CONN(conn));
|
||||
case CONN_TYPE_CONTROL:
|
||||
return connection_control_reached_eof(TO_CONTROL_CONN(conn));
|
||||
case CONN_TYPE_METRICS:
|
||||
return metrics_connection_reached_eof(conn);
|
||||
default:
|
||||
log_err(LD_BUG,"got unexpected conn type %d.", conn->type);
|
||||
tor_fragile_assert();
|
||||
|
||||
Reference in New Issue
Block a user