Log connection errors when debug mode
This commit is contained in:
parent
0c877a9d94
commit
01bef851ed
|
@ -781,6 +781,9 @@ func (me *Client) outgoingConnection(t *torrent, addr string, ps peerSource) {
|
||||||
// failure.
|
// failure.
|
||||||
me.noLongerHalfOpen(t, addr)
|
me.noLongerHalfOpen(t, addr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if me.config.Debug {
|
||||||
|
log.Printf("error establishing outgoing connection: %s", err)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if c == nil {
|
if c == nil {
|
||||||
|
@ -790,7 +793,9 @@ func (me *Client) outgoingConnection(t *torrent, addr string, ps peerSource) {
|
||||||
c.Discovery = ps
|
c.Discovery = ps
|
||||||
err = me.runInitiatedHandshookConn(c, t)
|
err = me.runInitiatedHandshookConn(c, t)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// log.Print(err)
|
if me.config.Debug {
|
||||||
|
log.Printf("error in established outgoing connection: %s", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue