Skip to content

Commit

Permalink
lib: connection - Move creation of passthrough event in connection_cl…
Browse files Browse the repository at this point in the history
…ient_connected().

Moved close to where it is used, which is more common in event code elsewhere.
  • Loading branch information
stephanbosch committed Mar 1, 2019
1 parent b7181b1 commit 632165e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/connection.c
Expand Up @@ -433,9 +433,6 @@ void connection_streams_changed(struct connection *conn)

static void connection_client_connected(struct connection *conn, bool success)
{
struct event_passthrough *e = event_create_passthrough(conn->event)->
set_name("server_connection_connected");

i_assert(conn->list->set.client);

connection_update_properties(conn);
Expand All @@ -444,6 +441,8 @@ static void connection_client_connected(struct connection *conn, bool success)
event_add_timeval(conn->event, "connect_finished_time",
&ioloop_timeval);

struct event_passthrough *e = event_create_passthrough(conn->event)->
set_name("server_connection_connected");
if (success) {
e_debug(e->event(), "Client connected (fd=%d)",
conn->fd_in);
Expand Down

0 comments on commit 632165e

Please sign in to comment.