You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document how to have a separate idle and read timeout #87
If enough people need this, I can add a method to the conn c.SetReadTimeout that controls the maximum time spent reading each message. Then the context passed in would effectively act as the idle timeout.
@nhooyr thanks for all the work on this library. Add me as a vote for this option
Specifically it currently looks like I'd have to unwrap the logic encapsulated in wsjson.Read if I wanted to have that functionality with this option. Let me know if not.
@nhooyr thanks for all the work on this library. Add me as a vote for this option
Thanks :)
Specifically it currently looks like I'd have to unwrap the logic encapsulated in wsjson.Read if I wanted to have that functionality with this option. Let me know if not.
Yes, unfortunately you would need to unwrap the logic in wsjson. For now, I would recommend going that route as no one else has requested this option.
Is there a reason you can't just bound the entire wsjson read to something like a few minutes? As long as you have a read limit, things should be fine.
It was with the aim to have checks over the two different steps. A general longer term read wait timeout and a specific timeout once we actually have something to read.
Activity
nhooyr commentedon Jun 3, 2019
If enough people need this, I can add a method to the conn
c.SetReadTimeoutthat controls the maximum time spent reading each message. Then the context passed in would effectively act as the idle timeout.Document separate idle and read timeout
Document separate idle and read timeout
Document separate idle and read timeout
mikestead commentedon Sep 13, 2019
@nhooyr thanks for all the work on this library. Add me as a vote for this option
Specifically it currently looks like I'd have to unwrap the logic encapsulated in
wsjson.Readif I wanted to have that functionality with this option. Let me know if not.nhooyr commentedon Sep 13, 2019
Thanks :)
Yes, unfortunately you would need to unwrap the logic in wsjson. For now, I would recommend going that route as no one else has requested this option.
Is there a reason you can't just bound the entire wsjson read to something like a few minutes? As long as you have a read limit, things should be fine.
mikestead commentedon Sep 13, 2019
No problem.
It was with the aim to have checks over the two different steps. A general longer term read wait timeout and a specific timeout once we actually have something to read.
nhooyr commentedon Nov 26, 2020
Looks like this was lost somehow, will need to investigate why it isn't in master anymore.
Add back documentation on separate idle and read timeout