Commit aa963178 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 40953b04
......@@ -75,8 +75,9 @@ func NewStorage(clusterName, masterAddr string, net xnet.Networker, back storage
// The storage will be serving incoming connections on l.
func (stor *Storage) Run(ctx context.Context, l xnet.Listener) (err error) {
addr := l.Addr()
// XXX WithState?
log.Infof(ctx, "%s: listening on %s ...", stor.node.State.MyNID, addr)
stor.node.WithState(func(s *xneo.State) {
log.Infof(ctx, "%s: listening on %s ...", s.MyNID, addr)
})
stor.runCtx = ctx
defer func() {
......@@ -89,7 +90,7 @@ func (stor *Storage) Run(ctx context.Context, l xnet.Listener) (err error) {
if err != nil {
return fmt.Errorf("run @%s: %s", addr, err)
}
stor.node.LAddr = naddr
stor.node.Addr = naddr
// wrap listener with link / identification hello checker
stor.lli = xneo.NewListener(neonet.NewLinkListener(l))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment