lib/connections, lib/model: Additional connection info in logs (fixes #4499)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4665
This commit is contained in:
Simon Frei
2018-01-12 11:27:55 +00:00
committed by Audrius Butkevicius
parent 6e0f64017a
commit 341b9691a7
4 changed files with 29 additions and 27 deletions

View File

@@ -28,6 +28,7 @@ type Connection interface {
Transport() string
RemoteAddr() net.Addr
Priority() int
String() string
}
// completeConn is the aggregation of an internalConn and the
@@ -114,7 +115,7 @@ func (c internalConn) Transport() string {
}
func (c internalConn) String() string {
return fmt.Sprintf("%s-%s/%s", c.LocalAddr(), c.RemoteAddr(), c.connType.String())
return fmt.Sprintf("%s-%s/%s", c.LocalAddr(), c.RemoteAddr(), c.Type())
}
type dialerFactory interface {