Commit cf76530c authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 47da6c8e
...@@ -201,7 +201,7 @@ func (stor *Storage) talkMaster1(ctx context.Context) (err error) { ...@@ -201,7 +201,7 @@ func (stor *Storage) talkMaster1(ctx context.Context) (err error) {
// every new connection from master means talk over previous connection is done/cancelled. // every new connection from master means talk over previous connection is done/cancelled.
// XXX check compatibility with py // XXX check compatibility with py
type accepted struct { type accepted struct {
conn *Conn conn *neo.Conn
err error err error
} }
acceptq := make(chan accepted, 1) acceptq := make(chan accepted, 1)
...@@ -244,13 +244,13 @@ loop: ...@@ -244,13 +244,13 @@ loop:
// XXX check for shutdown command // XXX check for shutdown command
continue loop // retry from initializing continue loop // retry from initializing
case MnextConn, err := <-acceptq: case a := <-acceptq:
lclose(ctx, Mconn) // wakeup/cancel current talk lclose(ctx, Mconn) // wakeup/cancel current talk
if err != nil { if a.err != nil {
return err return a.err
} }
<-talkq <-talkq
Mconn = MnextConn Mconn = a.conn
case <-ctx.Done(): case <-ctx.Done():
return ctx.Err() return ctx.Err()
......
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