mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-25 12:57:17 +00:00
Merge pull request #3248 from zsfelfoldi/light-topic3
Topic discovery bugfix
This commit is contained in:
commit
932d973e36
@ -236,7 +236,7 @@ func (pm *ProtocolManager) removePeer(id string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (pm *ProtocolManager) findServers() {
|
func (pm *ProtocolManager) findServers() {
|
||||||
if pm.p2pServer == nil {
|
if pm.p2pServer == nil || pm.topicDisc == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
enodes := make(chan string, 100)
|
enodes := make(chan string, 100)
|
||||||
@ -259,7 +259,10 @@ func (pm *ProtocolManager) findServers() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
time.Sleep(time.Second * 20)
|
select {
|
||||||
|
case <-time.After(time.Second * 20):
|
||||||
|
case <-pm.quitSync:
|
||||||
|
}
|
||||||
close(stop)
|
close(stop)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -863,6 +863,9 @@ func init() {
|
|||||||
name: "verifywait",
|
name: "verifywait",
|
||||||
handle: func(net *Network, n *Node, ev nodeEvent, pkt *ingressPacket) (*nodeState, error) {
|
handle: func(net *Network, n *Node, ev nodeEvent, pkt *ingressPacket) (*nodeState, error) {
|
||||||
switch ev {
|
switch ev {
|
||||||
|
case pingPacket:
|
||||||
|
net.handlePing(n, pkt)
|
||||||
|
return verifywait, nil
|
||||||
case pongPacket:
|
case pongPacket:
|
||||||
err := net.handleKnownPong(n, pkt)
|
err := net.handleKnownPong(n, pkt)
|
||||||
return known, err
|
return known, err
|
||||||
|
Loading…
Reference in New Issue
Block a user