Skip to content

Commit

Permalink
resetting return on Unexpected EOF (its a VPN issue)
Browse files Browse the repository at this point in the history
  • Loading branch information
zephinzer committed Jun 29, 2021
1 parent eb23d5c commit 44f87bf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/xtermjs/handler_websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ func GetHandler(opts HandlerOpts) func(http.ResponseWriter, *http.Request) {
go func() {
errorCounter := 0
for {
// consider the connection closed/errored out
// consider the connection closed/errored out so that the socket handler
// can be terminated - this frees up memory so the service doesn't get
// overloaded
if errorCounter > connectionErrorLimit {
waiter.Done()
break
Expand Down Expand Up @@ -135,7 +137,6 @@ func GetHandler(opts HandlerOpts) func(http.ResponseWriter, *http.Request) {
if err != nil {
if !connectionClosed {
clog.Warnf("failed to get next reader: %s", err)
continue
}
return
}
Expand Down

0 comments on commit 44f87bf

Please sign in to comment.