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 on type of message and take action
|
||||||
switch m.Header["Micro-Tunnel"] {
|
switch m.Header["Micro-Method"] {
|
||||||
case n.Router.Options().Id:
|
case "advert":
|
||||||
// NOTE: this should not happen
|
|
||||||
// skip local adverts
|
|
||||||
continue
|
|
||||||
default:
|
|
||||||
pbAdvert := &pb.Advert{}
|
pbAdvert := &pb.Advert{}
|
||||||
if err := proto.Unmarshal(m.Body, pbAdvert); err != nil {
|
if err := proto.Unmarshal(m.Body, pbAdvert); err != nil {
|
||||||
continue
|
continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user