more connection logging consistency
This commit is contained in:
1 parent
1235441556
commit
cc8fad47dd
2 files changed
+3
-3
No files matched your search
@@ -198,9 +198,9 @@ func (cm *ConnectionMaker) status() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (cm *ConnectionMaker) attemptConnection(address string, acceptNewPeer bool) {
|
func (cm *ConnectionMaker) attemptConnection(address string, acceptNewPeer bool) {
|
||||||
log.Println("Attempting connection to", address)
|
log.Printf("->[%s] attempting connection\n", address)
|
||||||
if err := cm.ourself.CreateConnection(address, acceptNewPeer); err != nil {
|
if err := cm.ourself.CreateConnection(address, acceptNewPeer); err != nil {
|
||||||
log.Println(err)
|
log.Printf("->[%s] error during connection attempt: %v\n", err)
|
||||||
cm.ConnectionTerminated(address)
|
cm.ConnectionTerminated(address)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -157,7 +157,7 @@ func (router *Router) acceptTCP(tcpConn *net.TCPConn) {
|
|||||||
// on Port and we wait for them to send us something on UDP to
|
// on Port and we wait for them to send us something on UDP to
|
||||||
// start.
|
// start.
|
||||||
remoteAddrStr := tcpConn.RemoteAddr().String()
|
remoteAddrStr := tcpConn.RemoteAddr().String()
|
||||||
log.Printf("->[%s] connection accepted", remoteAddrStr)
|
log.Printf("->[%s] connection accepted\n", remoteAddrStr)
|
||||||
connRemote := NewRemoteConnection(router.Ourself.Peer, nil, remoteAddrStr)
|
connRemote := NewRemoteConnection(router.Ourself.Peer, nil, remoteAddrStr)
|
||||||
NewLocalConnection(connRemote, true, tcpConn, nil, router)
|
NewLocalConnection(connRemote, true, tcpConn, nil, router)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user