go-zookeeper
go-zookeeper copied to clipboard
conn.Close is not Idempotent
API conn.Close() Calling conn.Close on already closed connection causes program to panic, It would be good, if the call is made idempotent.
goroutine 8 [running]:
panic(0x576420, 0xc420252880)
Documents/devtools/go/src/runtime/panic.go:500 +0x1a1
/github.com/samuel/go-zookeeper/zk.(*Conn).Close(0xc4203ea000)
/home/Documents/git/goworkspace/src/github.com/samuel/go-zookeeper/zk/conn.go:253 +0x47
any update on this? conn.Close() is not atomic even though most of APIs are goroutine safe.