From 7d507f611e58e21786b4296a1acd4378934dff78 Mon Sep 17 00:00:00 2001 From: Anshul Pundir Date: Fri, 26 Jan 2018 15:13:50 -0800 Subject: [PATCH] [agent] Minor fix for session log to be in the correct place. Signed-off-by: Anshul Pundir --- agent/session.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agent/session.go b/agent/session.go index b1038c263e..9bb9773a6c 100644 --- a/agent/session.go +++ b/agent/session.go @@ -65,12 +65,14 @@ func newSession(ctx context.Context, agent *Agent, delay time.Duration, sessionI grpc.WithTransportCredentials(agent.config.Credentials), grpc.WithTimeout(dispatcherRPCTimeout), ) - log.G(ctx).Infof("manager selected by agent for new session: %v", cc.Peer()) if err != nil { s.errs <- err return s } + + log.G(ctx).Infof("manager selected by agent for new session: %v", cc.Peer()) + s.conn = cc go s.run(sessionCtx, delay, description)