Skip to content

Commit

Permalink
lib: connection - Clarify logging of incoming connections
Browse files Browse the repository at this point in the history
Don't log "Client connected" for both incoming and outgoing connections.
  • Loading branch information
sirainen authored and cmouse committed Aug 29, 2018
1 parent b1034b3 commit 22700d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/connection.c
Expand Up @@ -262,7 +262,10 @@ void connection_init_server(struct connection_list *list,

struct event_passthrough *e = event_create_passthrough(conn->event)->
set_name("client_connection_connected");
e_debug(e->event(), "Client connected");
/* fd_out differs from fd_in only for stdin/stdout. Keep the logging
output nice and clean by logging only the fd_in. If it's 0, it'll
also be obvious that fd_out=1. */
e_debug(e->event(), "Server accepted connection (fd=%d)", fd_in);

connection_init_streams(conn);
}
Expand Down

0 comments on commit 22700d2

Please sign in to comment.