Skip to content

Commit

Permalink
Add ticket as comment in hotspots
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa committed Jun 9, 2023
1 parent e4242e1 commit 1f8ba28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions network/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ func (pr *Proxy) PassThrough(gconn gnet.Conn) *gerr.GatewayDError {

// The connection to the server is closed, so we MUST reconnect,
// otherwise the client will be stuck.
// TODO: Fix bug in handling connection close
// See: https://github.com/gatewayd-io/gatewayd/issues/219
if IsConnClosed(received, err) || IsConnTimedOut(err) {
pr.logger.Debug().Fields(
map[string]interface{}{
Expand All @@ -371,6 +373,8 @@ func (pr *Proxy) PassThrough(gconn gnet.Conn) *gerr.GatewayDError {
}

// If the response is empty, don't send anything, instead just close the ingress connection.
// TODO: Fix bug in handling connection close
// See: https://github.com/gatewayd-io/gatewayd/issues/219
if received == 0 {
pr.logger.Debug().Fields(
map[string]interface{}{
Expand Down
2 changes: 2 additions & 0 deletions network/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ func (s *Server) OnTraffic(gconn gnet.Conn) gnet.Action {
errors.Is(err, gerr.ErrClientReceiveFailed),
errors.Is(err, gerr.ErrHookTerminatedConnection),
errors.Is(err.Unwrap(), io.EOF):
// TODO: Fix bug in handling connection close
// See: https://github.com/gatewayd-io/gatewayd/issues/219
return gnet.Close
}
}
Expand Down

0 comments on commit 1f8ba28

Please sign in to comment.