more connection logging consistency

This commit is contained in:
Matthias Radestock committed 2015-01-13 16:30:13 +00:00
1 parent 1235441556
commit cc8fad47dd
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -198,9 +198,9 @@ func (cm *ConnectionMaker) status() string {
}
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 {
log.Println(err)
log.Printf("->[%s] error during connection attempt: %v\n", err)
cm.ConnectionTerminated(address)
}
}
+1 -1
View File
@@ -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
// start.
remoteAddrStr := tcpConn.RemoteAddr().String()
log.Printf("->[%s] connection accepted", remoteAddrStr)
log.Printf("->[%s] connection accepted\n", remoteAddrStr)
connRemote := NewRemoteConnection(router.Ourself.Peer, nil, remoteAddrStr)
NewLocalConnection(connRemote, true, tcpConn, nil, router)
}