Skip to content

Commit

Permalink
fix: Use a proper error instance to write an error log.
Browse files Browse the repository at this point in the history
  • Loading branch information
FGtatsuro committed Nov 2, 2023
1 parent 597b304 commit e0f08f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ func (c *Client) proxyConn(inst string, client, server net.Conn) {
cleanup(fmt.Sprintf("[%s] instance closed the connection", inst), false)
return
case sErr != nil:
cleanup(fmt.Sprintf("[%s] connection aborted - error writing to instance: %v", inst, cErr), true)
cleanup(fmt.Sprintf("[%s] connection aborted - error writing to instance: %v", inst, sErr), true)
return
}
}
Expand All @@ -955,7 +955,7 @@ func (c *Client) proxyConn(inst string, client, server net.Conn) {
cleanup(fmt.Sprintf("[%s] client closed the connection", inst), false)
return
case cErr != nil:
cleanup(fmt.Sprintf("[%s] connection aborted - error writing to client: %v", inst, sErr), true)
cleanup(fmt.Sprintf("[%s] connection aborted - error writing to client: %v", inst, cErr), true)
return
}
}
Expand Down

0 comments on commit e0f08f8

Please sign in to comment.