When Close is invoked, zk_client waits indefinitely on this line. Buffered channel(c.sendChan) is full and waiting to send a request over this channel.
(dlv) bt
0 0x000000000042ebac in runtime.gopark
at golang/go-1.9.2/src/runtime/proc.go:288
1 0x000000000042ec9e in runtime.goparkunlock
at golang/go-1.9.2/src/runtime/proc.go:293
2 0x000000000040568b in runtime.chansend
at golang/go-1.9.2/src/runtime/chan.go:222
3 0x0000000000405413 in runtime.chansend1
at golang/go-1.9.2/src/runtime/chan.go:113
4 0x000000000079dbaf in vendor/github.com/samuel/go-zookeeper/zk.(*Conn).Close
at /<Internal Path>/vendor/github.com/samuel/go-zookeeper/zk/conn.go:945
is in select call, for select to work it has to collect the channel before waiting on channel. In this case channel is never read and Close call is waiting indefinitely. Do we know why this might be happening? If it just a matter of honoring the timeout, can we please ensure, Close honors the timeout in https://github.com/samuel/go-zookeeper/blob/master/zk/conn.go#L317 ?
When Close is invoked, zk_client waits indefinitely on this line. Buffered channel(c.sendChan) is full and waiting to send a request over this channel.
Though this method
is in select call, for select to work it has to collect the channel before waiting on channel. In this case channel is never read and
Close
call is waiting indefinitely. Do we know why this might be happening? If it just a matter of honoring the timeout, can we please ensure,Close
honors the timeout in https://github.com/samuel/go-zookeeper/blob/master/zk/conn.go#L317 ?