OSDN Git Service

fix(log): change p2p connection error log level p2p
authorDeKaiju <longjinglv@gmail.com>
Fri, 22 Nov 2019 04:29:03 +0000 (12:29 +0800)
committerDeKaiju <longjinglv@gmail.com>
Fri, 22 Nov 2019 04:29:03 +0000 (12:29 +0800)
p2p/connection/connection.go

index 852c4f6..46a97ad 100644 (file)
@@ -247,7 +247,7 @@ func (c *MConnection) String() string {
 
 func (c *MConnection) flush() {
        if err := c.bufWriter.Flush(); err != nil {
-               log.WithFields(log.Fields{"module": logModule, "error": err}).Error("MConnection flush failed")
+               log.WithFields(log.Fields{"module": logModule, "error": err}).Warn("MConnection flush failed")
        }
 }
 
@@ -405,7 +405,7 @@ func (c *MConnection) sendRoutine() {
                        return
                }
                if err != nil {
-                       log.WithFields(log.Fields{"module": logModule, "conn": c, "error": err}).Error("Connection failed @ sendRoutine")
+                       log.WithFields(log.Fields{"module": logModule, "conn": c, "error": err}).Warn("Connection failed @ sendRoutine")
                        c.stopForError(err)
                        return
                }