Skip to content

No way to ignore gun_tunnel_up #322

Closed Answered by essen
voluntas asked this question in Q&A
Dec 4, 2023 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

You shouldn't ignore it, it's there to inform you the tunnel is up and that you can send requests. It's sent after you call gun:connect or when the SOCKS connection is established. Until you receive this message, any request you send may not end up on the right server, especially when you use gun:connect. For example:

  • Call gun:connect
  • Call gun:get with the tunnel option
  • Receive a 500 response from gun:connect
  • The gun:get that was already sent will not reach the remote endpoint but will instead be handled by the proxy as if it was a normal pipeline request
  • Confusion

You should treat gun_tunnel_up the same way as gun_up in your gen_server: it is not ready to do requests until it receives it.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@voluntas
Comment options

@essen
Comment options

@voluntas
Comment options

Answer selected by voluntas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants