OSDN Git Service

fix(log): change p2p connection error log level (#445)
authorDeKaiju <longjinglv@gmail.com>
Fri, 22 Nov 2019 05:14:14 +0000 (13:14 +0800)
committerPaladz <yzhu101@uottawa.ca>
Fri, 22 Nov 2019 05:14:14 +0000 (13:14 +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
                }