go-zookeeper icon indicating copy to clipboard operation
go-zookeeper copied to clipboard

Why clear timeout when read a response from server?

Open opriz opened this issue 4 years ago • 1 comments

I found this line in conn.go

https://github.com/samuel/go-zookeeper/blob/master/zk/conn.go#L717 c.conn.SetReadDeadline(time.Time{})

In my view, if there occurs a problem in the network or server, clear the timeout deadline may cause this goroutine stuck for a long time even forever, then others stuck too because of the channel.

I wonder why it was written like this, was there some reason I've missed it? If necessary, I'd like to post an mr.

opriz avatar Jan 19 '21 08:01 opriz

I also meet this problem.

blizard863 avatar Mar 04 '21 02:03 blizard863