コード例 #1
0
ファイル: integration_test.go プロジェクト: spenczar/zksync
// Safely closes a zookeeper connection - probably won't panic if
// we're not currently connected (races are still possible,
// though). Should be used sparingly.
func quietClose(conn *zk.Conn) {
	if conn.State() != zk.StateDisconnected {
		conn.Close()
	}
}