Commit 2a756ed2 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 7c804efa
...@@ -149,6 +149,7 @@ func (node *_MasteredNode) talkMaster1(ctx, ctxPreTalkM context.Context, f func( ...@@ -149,6 +149,7 @@ func (node *_MasteredNode) talkMaster1(ctx, ctxPreTalkM context.Context, f func(
return err return err
} }
// XXX close on RetCancel
return xcontext.WithCloseOnErrCancel(ctx, mlink, func() (err error) { return xcontext.WithCloseOnErrCancel(ctx, mlink, func() (err error) {
if accept.YourNID != node.MyInfo.NID { if accept.YourNID != node.MyInfo.NID {
log.Infof(ctx, "master %s told us to be %s", accept.MyNID, accept.YourNID) log.Infof(ctx, "master %s told us to be %s", accept.MyNID, accept.YourNID)
...@@ -202,6 +203,8 @@ func (node *_MasteredNode) talkMaster1(ctx, ctxPreTalkM context.Context, f func( ...@@ -202,6 +203,8 @@ func (node *_MasteredNode) talkMaster1(ctx, ctxPreTalkM context.Context, f func(
// run user code // run user code
return f(ctx, &_MasterLink{mlink, node}) return f(ctx, &_MasterLink{mlink, node})
// TODO ? send "disconnect" on Close (? proto.CloseClient)
}) })
} }
......
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