summaryrefslogtreecommitdiff
path: root/dispatch.go
diff options
context:
space:
mode:
Diffstat (limited to 'dispatch.go')
-rw-r--r--dispatch.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/dispatch.go b/dispatch.go
index 04a5eddbb..1d67d9e46 100644
--- a/dispatch.go
+++ b/dispatch.go
@@ -27,9 +27,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]
@@ -52,7 +52,7 @@ func Sub(channel string, cb Subscriber) {
func Pub(channel string, payload []byte) {
resChan <- &BaseMsg{
- Channel: &channel,
+ Channel: channel,
Payload: payload,
}
}