Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
clarify messages used on connection errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bboreham committed Oct 15, 2014
1 parent 0dc8fd8 commit e8ec9e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions router/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (conn *LocalConnection) CheckFatal(err error) error {
if err == nil {
return nil
}
conn.log("encountered fatal error", err)
conn.log("error:", err)
conn.Shutdown()
return err
}
Expand Down Expand Up @@ -173,7 +173,7 @@ func (conn *LocalConnection) queryLoop(queryChan <-chan *ConnectionInteraction,
terminate := false
for !terminate {
if err != nil {
conn.log("encountered fatal error", err)
conn.log("error:", err)
break
}
query, ok := <-queryChan
Expand Down Expand Up @@ -242,7 +242,7 @@ func (conn *LocalConnection) handleSendTCP(msg []byte) error {

func (conn *LocalConnection) handleShutdown() {
if conn.remote != nil {
conn.log("shutting down")
conn.log("connection shutting down")
}

// Whilst some of these elements may have been written to whilst
Expand Down

2 comments on commit e8ec9e8

@hesco
Copy link

@hesco hesco commented on e8ec9e8 Oct 17, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking it would be clearer to frame this as:
error: connection to $peer_ip_addr peer is shutting down

@rade
Copy link
Member

@rade rade commented on e8ec9e8 Oct 17, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking it would be clearer to frame this as:
error: connection to $peer_ip_addr peer is shutting down

Currently all connection related log messages identify the connection by the peer id (that's what conn.log(...) does), though I can see a case for possibly wanting to additionally include the peer ip & port too. That is unrelated to this issue/pr though.

Please sign in to comment.