From 6c1f1d66f7b9bd98189a18f5d7984683b963ad28 Mon Sep 17 00:00:00 2001 From: Milos Gajdos Date: Tue, 20 Aug 2019 21:30:25 +0100 Subject: [PATCH] Switch received messages on the right header --- network/default.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/network/default.go b/network/default.go index ed23a7d7..d5f3f8ce 100644 --- a/network/default.go +++ b/network/default.go @@ -140,12 +140,8 @@ func (n *network) process(client transport.Client) { } // switch on type of message and take action - switch m.Header["Micro-Tunnel"] { - case n.Router.Options().Id: - // NOTE: this should not happen - // skip local adverts - continue - default: + switch m.Header["Micro-Method"] { + case "advert": pbAdvert := &pb.Advert{} if err := proto.Unmarshal(m.Body, pbAdvert); err != nil { continue