Skip to content

Commit

Permalink
if connection is unsucessful SetPongHandler would cause a panic
Browse files Browse the repository at this point in the history
  • Loading branch information
unique1o1 committed Jun 19, 2021
1 parent 0ffe4af commit 5d07158
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 32 deletions.
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/jprq-client.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

3 changes: 2 additions & 1 deletion tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ func openTunnel() {
u := url.URL{Scheme: "wss", Host: *host, Path: "/_ws/", RawQuery: getParams()}
fmt.Printf("\u001B[34mConnecting to %s \n\n", u.String())
c, _, err := websocket.DefaultDialer.Dial(u.String(), nil)
keepAlive(c, time.Minute)

if err != nil {
log.Fatal("dial:", err)
}
keepAlive(c, time.Minute)

defer c.Close()

message, err := ReadHandshakeMessage(c)
Expand Down

0 comments on commit 5d07158

Please sign in to comment.