Switch received messages on the right header
This commit is contained in:
parent
a6e1287b27
commit
6c1f1d66f7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user