Skip to content

Commit

Permalink
[supervisor] Don't panic if connection is already closed (#18956)
Browse files Browse the repository at this point in the history
  • Loading branch information
csweichel authored Oct 19, 2023
1 parent c46f9bf commit 323fc19
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/gitpod-protocol/go/reconnecting-ws.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ func (rc *ReconnectingWebsocket) Dial(ctx context.Context) error {
case connCh := <-rc.connCh:
connCh <- conn
case <-rc.errCh:
conn.Close()
if conn != nil {
conn.Close()
}

time.Sleep(1 * time.Second)
conn = rc.connect(ctx)
Expand Down

0 comments on commit 323fc19

Please sign in to comment.