Commit 598538fd authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 4ba6eacf
......@@ -111,7 +111,9 @@ func NewClient(clusterName, masterAddr string, net xnet.Networker) *Client {
// Run starts client node and runs it until either ctx is canceled or master
// commands it to shutdown. (TODO verify M->shutdown)
func (cli *Client) Run(ctx context.Context) error {
func (cli *Client) Run(ctx context.Context) (err error) {
defer task.Running(&ctx, "client")(&err)
// run process which performs master talk
ctx, cancel := context.WithCancel(ctx)
cli.talkMasterCancel = cancel
......
......@@ -153,7 +153,7 @@ func (node *_MasteredNode) talkMaster1(ctx context.Context) (err error) {
err = xcontext.WithCloseOnErrCancel(ctx, mlink, func() error {
if accept.YourNID != node.myInfo.NID {
log.Info(ctx, "master told us to have nid=%s", accept.YourNID)
log.Infof(ctx, "master told us to have nid=%s", accept.YourNID)
node.myInfo.NID = accept.YourNID // XXX locking ?
}
......
......@@ -86,7 +86,7 @@ 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()
defer task.Runningf(&ctx, "storage(%v)", addr)(&err)
defer task.Runningf(&ctx, "storage(%s)", addr)(&err)
// update our serving address in node
naddr, err := proto.Addr(addr)
......
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