Skip to content

Commit

Permalink
output simpler error
Browse files Browse the repository at this point in the history
  • Loading branch information
xtaci committed Dec 8, 2024
1 parent 158b0b5 commit 50e7caf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hopper.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,15 @@ func (l *Listener) switcher() {
case gaio.OpWrite:
// done writting to proxy connection.
if res.Error != nil {
l.logger.Printf("[switcher]write error: %#v", res)
l.logger.Printf("[switcher]write error: %v, %v, %v, %v", res.Error, res.Conn.RemoteAddr(), res.Conn.LocalAddr(), res.Context)
l.removeClient(res.Conn.RemoteAddr())
continue
}

case gaio.OpRead:
// any read error from the proxy connection cleans the other side(client).
if res.Error != nil {
l.logger.Printf("[switcher]read error: %#v", res)
l.logger.Printf("[switcher]read error: %v, %v, %v, %v", res.Error, res.Conn.RemoteAddr(), res.Conn.LocalAddr(), res.Context)
l.removeClient(res.Conn.RemoteAddr())
continue
}
Expand Down

0 comments on commit 50e7caf

Please sign in to comment.