Small bug fixes.
This commit is contained in:
parent
b8d814f636
commit
f47a8245b4
@ -152,6 +152,9 @@ func (s *peerSupervisor) server() stateFunc {
|
|||||||
timeoutTimer = time.NewTimer(timeoutInterval)
|
timeoutTimer = time.NewTimer(timeoutInterval)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Timer will be restarted once we have established a connection.
|
||||||
|
timeoutTimer.Stop()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case peer := <-s.peerUpdates:
|
case peer := <-s.peerUpdates:
|
||||||
@ -161,6 +164,8 @@ func (s *peerSupervisor) server() stateFunc {
|
|||||||
switch p := pkt.Payload.(type) {
|
switch p := pkt.Payload.(type) {
|
||||||
|
|
||||||
case synPacket:
|
case synPacket:
|
||||||
|
timeoutTimer.Reset(timeoutInterval)
|
||||||
|
|
||||||
// Before we can respond to this packet, we need to make sure the
|
// Before we can respond to this packet, we need to make sure the
|
||||||
// route is setup properly.
|
// route is setup properly.
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user