Commit b5b0419e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 45f14a0c
......@@ -99,7 +99,6 @@ type Master struct {
}
// nodeCome represents "node connects" event.
// XXX main <- accept
type nodeCome struct {
req *neonet.Request
idReq *proto.RequestIdentification // we received this identification request
......@@ -302,7 +301,7 @@ func (m *Master) Run(ctx context.Context, l xnet.Listener) (err error) {
err = ctx.Err()
}
xio.LClose(ctx, lli) // XXX here ok? (probbly not)
xio.LClose(ctx, lli) // XXX here ok? (probably not)
return err
}
......@@ -1007,18 +1006,9 @@ func (m *Master) serveClient(ctx context.Context, cli *_MasteredPeer) (err error
defer task.Runningf(&ctx, "%s: serve client", cli.node.NID)(&err)
clink := cli.node.Link()
// wg, ctx := errgroup.WithContext(ctx) // XXX -> sync.WorkGroup
defer xio.CloseWhenDone(ctx, clink)() // XXX -> cli.ResetLink? (better not here)
/* XXX kill
// M -> C notifications about cluster state
wg.Go(func() error {
return m.keepPeerUpdated(ctx, clink)
})
*/
// M <- C requests handler
// wg.Go(func() error {
for {
req, err := clink.Recv1()
if err != nil {
......@@ -1032,9 +1022,6 @@ func (m *Master) serveClient(ctx context.Context, cli *_MasteredPeer) (err error
return err
}
}
// })
//
// return wg.Wait()
}
// serveClient1 prepares response for 1 request from client.
......
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