Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

Why clear timeout when read a response from server? #257

Open
opriz opened this issue Jan 19, 2021 · 1 comment
Open

Why clear timeout when read a response from server? #257

opriz opened this issue Jan 19, 2021 · 1 comment

Comments

@opriz
Copy link

opriz commented Jan 19, 2021

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 opriz changed the title why clear timeout when read a response from server? Why clear timeout when read a response from server? Jan 19, 2021
@blizard863
Copy link

I also meet this problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants