From 9ecef5e458b8ed07a5b10abd79db29d64a6424fc Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Fri, 12 Dec 2014 14:39:14 +0000 Subject: [PATCH] refactor --- router/connection.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/router/connection.go b/router/connection.go index 87fb82a2..fe9073d3 100644 --- a/router/connection.go +++ b/router/connection.go @@ -486,14 +486,14 @@ func (conn *LocalConnection) receiveTCP(decoder *gob.Decoder, usingPassword bool // request full update conn.SendTCP(ProtocolFetchAllByte) continue - } else if conn.CheckFatal(err) != nil { + } + if conn.CheckFatal(err) != nil { return } - if len(newUpdate) == 0 { - continue + if len(newUpdate) != 0 { + conn.Router.Topology.RebuildRoutes() + conn.local.BroadcastTCP(Concat(ProtocolUpdateByte, newUpdate)) } - conn.Router.Topology.RebuildRoutes() - conn.local.BroadcastTCP(Concat(ProtocolUpdateByte, newUpdate)) } else if msg[0] == ProtocolPMTUVerified { conn.verifyPMTU <- int(binary.BigEndian.Uint16(msg[1:])) } else {