diff options
-rw-r--r-- | serve_mx.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/serve_mx.go b/serve_mx.go index f938c02..375a956 100644 --- a/serve_mx.go +++ b/serve_mx.go @@ -213,11 +213,10 @@ func (session *mx_recv_session) handle(ctx context.Context) error { } } -func mx_new_session(ctx context.Context, net_conn net.Conn) error { - session := mx_recv_session{ +func mx_new_session(net_conn net.Conn) mx_recv_session { + return mx_recv_session{ net_conn: net_conn, } - return session.handle(ctx) } func serve_mx() { @@ -243,7 +242,8 @@ func serve_mx() { go func() { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - err := mx_new_session(ctx, conn) + session := mx_new_session(conn) + err := session.handle(ctx) if err != nil { if err == err_connection_handler_eof { clog.Info("MX: Connection for " + conn.RemoteAddr().String() + " closed with EOF") |