do not dispatch control messages

This commit is contained in:
Marcelo Pires 2018-09-05 11:59:20 +02:00
parent 42dbadb947
commit 735a044485

View File

@ -7,6 +7,7 @@ import (
"github.com/thesyncim/faye/transport" "github.com/thesyncim/faye/transport"
"log" "log"
"strconv" "strconv"
"strings"
"sync/atomic" "sync/atomic"
) )
@ -154,8 +155,11 @@ func (w *Websocket) Subscribe(subscription string, onMessage func(message *messa
if err != nil { if err != nil {
return err return err
} }
//hack
msg := payload[0] msg := payload[0]
if strings.HasPrefix(msg.Channel, "/meta") {
continue //todo update introspect message and update state
}
onMessage(&msg) onMessage(&msg)
} }
return nil return nil