OSDN Git Service

fix
authorHAOYUatHZ <haoyu@protonmail.com>
Mon, 19 Aug 2019 03:21:45 +0000 (11:21 +0800)
committerHAOYUatHZ <haoyu@protonmail.com>
Mon, 19 Aug 2019 03:21:45 +0000 (11:21 +0800)
toolbar/precog/monitor/stats.go

index 0effb7b..09d4498 100644 (file)
@@ -71,7 +71,7 @@ func (m *monitor) savePeerInfo(peerInfo *peers.PeerInfo) error {
                // PingTimes     uint64
                // PongTimes     uint64
        }
-       if err := m.db.Model(&orm.NodeLiveness{}).Where("node_id = ?, status is NOT ?", ormNode.ID, common.NodeOfflineStatus).
+       if err := m.db.Model(&orm.NodeLiveness{}).Where("node_id = ? AND status is NOT ?", ormNode.ID, common.NodeOfflineStatus).
                UpdateColumn(&orm.NodeLiveness{
                        BestHeight:    ormNodeLiveness.BestHeight,
                        AvgLantencyMS: ormNodeLiveness.AvgLantencyMS,