Merge pull request #572 from dshulyak/peercountlint

Fix PeerCount lint warning
This commit is contained in:
Dmitry Shulyak 2018-01-25 14:26:24 +02:00 committed by GitHub
commit 3b3097c95b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -295,6 +295,7 @@ func (m *NodeManager) addPeer(url string) error {
return nil
}
// PeerCount returns the number of connected peers.
func (m *NodeManager) PeerCount() int {
if m.node == nil || m.node.Server() == nil {
return 0