keepOnline try connect lost peer
()
| 469 | |
| 470 | //keepOnline try connect lost peer |
| 471 | func (this *P2PServer) keepOnlineService() { |
| 472 | t := time.NewTimer(time.Second * common.CONN_MONITOR) |
| 473 | for { |
| 474 | select { |
| 475 | case <-t.C: |
| 476 | this.retryInactivePeer() |
| 477 | t.Stop() |
| 478 | t.Reset(time.Second * common.CONN_MONITOR) |
| 479 | case <-this.quitOnline: |
| 480 | t.Stop() |
| 481 | return |
| 482 | } |
| 483 | } |
| 484 | } |
| 485 | |
| 486 | //reqNbrList ask the peer for its neighbor list |
| 487 | func (this *P2PServer) reqNbrList(p *peer.Peer) { |
no test coverage detected