Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gun-2.0.0-rc.1 - HTTP/2 connection process exits after 2 hours of no-use? #263

Closed
jainygaurav opened this issue Mar 9, 2021 · 2 comments

Comments

@jainygaurav
Copy link

jainygaurav commented Mar 9, 2021

Is there a gun config option that would make it work like 1.3.3 (i.e. gun-1.3.3 does not disconnect after 2 hours of no-use)?

Please help.

@jainygaurav jainygaurav changed the title Does gun-2.0.0-rc.1 close HTTP/2 connection after 2 hours on no-use? Does gun-2.0.0-rc.1 close/terminates HTTP/2 connection after 2 hours on no-use? Mar 9, 2021
@jainygaurav jainygaurav changed the title Does gun-2.0.0-rc.1 close/terminates HTTP/2 connection after 2 hours on no-use? Does gun-2.0.0-rc.1 close/terminates HTTP/2 connection after 2 hours of no-use? Mar 9, 2021
@jainygaurav jainygaurav changed the title Does gun-2.0.0-rc.1 close/terminates HTTP/2 connection after 2 hours of no-use? gun-2.0.0-rc.1 close/terminates HTTP/2 connection after 2 hours of no-use? Mar 9, 2021
@jainygaurav jainygaurav changed the title gun-2.0.0-rc.1 close/terminates HTTP/2 connection after 2 hours of no-use? gun-2.0.0-rc.1 - HTTP/2 connection process exits after 2 hours of no-use? Mar 10, 2021
@essen
Copy link
Member

essen commented Mar 10, 2021

This is probably the server closing the connection because Gun no longer sends pings by default (see keepalive option). But I'm not sure I understand, is there a problem? I don't think there is. Gun properly reconnects and you haven't lost any requests.

@essen essen closed this as completed Mar 10, 2021
@jainygaurav
Copy link
Author

jainygaurav commented Mar 10, 2021

@essen thank you for confirming. I was able to resolve this issue by:

{ Host
                           , Port
                           , #{ protocols      => [http2]
                              , tls_opts => TransportOpts
                              , http_opts => #{keepalive => 5000}
                              , http2_opts => #{keepalive => 5000}
                              , retry          => 0
                              }}

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

No branches or pull requests

2 participants