diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-05-22 14:10:13 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-05-22 14:10:15 -0400 |
commit | d0a8bacab612ae2ecae3525fb7548f1c5e6ed35d (patch) | |
tree | f12982ff0bad14b32f12da0b1417a4111d2676ed /dispatch.go | |
parent | 9ea397861feeefcce9f18947e10aa6cc155ec459 (diff) |
Use proto2 instead of proto3
Travis doesn't support proto3.
Diffstat (limited to 'dispatch.go')
-rw-r--r-- | dispatch.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dispatch.go b/dispatch.go index 9ac12d25c..09e5bad9f 100644 --- a/dispatch.go +++ b/dispatch.go @@ -23,9 +23,9 @@ func recv(buf []byte) (response []byte) { msg := &BaseMsg{} check(proto.Unmarshal(buf, msg)) assert(len(msg.Payload) > 0, "BaseMsg has empty payload.") - subscribers, ok := channels[msg.Channel] + subscribers, ok := channels[*msg.Channel] if !ok { - panic("No subscribers for channel " + msg.Channel) + panic("No subscribers for channel " + *msg.Channel) } for i := 0; i < len(subscribers); i++ { s := subscribers[i] @@ -48,7 +48,7 @@ func Sub(channel string, cb Subscriber) { func Pub(channel string, payload []byte) { resChan <- &BaseMsg{ - Channel: channel, + Channel: &channel, Payload: payload, } } |