diff options
Diffstat (limited to 'serve_mx.go')
-rw-r--r-- | serve_mx.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/serve_mx.go b/serve_mx.go index f3c1527..32710be 100644 --- a/serve_mx.go +++ b/serve_mx.go @@ -232,12 +232,17 @@ func handle_mx_recv_conn(ctx context.Context, net_conn net.Conn) error { } func serve_mx() { - listener, err := net.Listen(config.MX.Net, config.MX.Addr) + var mx_net, mx_addr string + config_consistent_run(func(){ + mx_net = config.MX.Net + mx_addr = config.MX.Addr + }) + listener, err := net.Listen(mx_net, mx_addr) if err != nil { clog.Fatal(1, "MX: Cannot listen: "+err.Error()) } defer listener.Close() - clog.Info("MX: Listening via " + config.MX.Net + " on " + config.MX.Addr) + clog.Info("MX: Listening via " + mx_net + " on " + mx_addr) for { conn, err := listener.Accept() |