Skip to content

Commit 44f87bf

Browse files
committed
resetting return on Unexpected EOF (its a VPN issue)
1 parent eb23d5c commit 44f87bf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pkg/xtermjs/handler_websocket.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ func GetHandler(opts HandlerOpts) func(http.ResponseWriter, *http.Request) {
102102
go func() {
103103
errorCounter := 0
104104
for {
105-
// consider the connection closed/errored out
105+
// consider the connection closed/errored out so that the socket handler
106+
// can be terminated - this frees up memory so the service doesn't get
107+
// overloaded
106108
if errorCounter > connectionErrorLimit {
107109
waiter.Done()
108110
break
@@ -135,7 +137,6 @@ func GetHandler(opts HandlerOpts) func(http.ResponseWriter, *http.Request) {
135137
if err != nil {
136138
if !connectionClosed {
137139
clog.Warnf("failed to get next reader: %s", err)
138-
continue
139140
}
140141
return
141142
}

0 commit comments

Comments
 (0)