From 9a532bb1377ed21734badf78c8fd07108c441e73 Mon Sep 17 00:00:00 2001 From: crusader Date: Wed, 27 Sep 2017 16:38:43 +0900 Subject: [PATCH] ing --- redis/subscribers.go | 2 +- subscriber_handler.go | 2 +- subscriber_handlers.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/redis/subscribers.go b/redis/subscribers.go index f00ddaf..0a6a53a 100644 --- a/redis/subscribers.go +++ b/redis/subscribers.go @@ -75,7 +75,7 @@ func (s *subscribers) listenSubscriptions() { switch v := s.conn.Receive().(type) { case redis.Message: if h, ok := s.subHandlers[v.Channel]; ok { - h.OnSubscribe(v.Channel, string(v.Data)) + h.OnSubscribe(v.Channel, v.Data) } break case redis.Subscription: diff --git a/subscriber_handler.go b/subscriber_handler.go index 0998982..b8b6b5d 100644 --- a/subscriber_handler.go +++ b/subscriber_handler.go @@ -2,5 +2,5 @@ package overflow_subscriber type SubscriberHandler interface { GetChannel() string - OnSubscribe(channel string, payload string) + OnSubscribe(channel string, payload []byte) } diff --git a/subscriber_handlers.go b/subscriber_handlers.go index d1a7e7d..7f10b50 100644 --- a/subscriber_handlers.go +++ b/subscriber_handlers.go @@ -7,5 +7,5 @@ type SubscriberHandlers struct { func (h *SubscriberHandlers) GetChannel() string { return h.Channel } -func (h *SubscriberHandlers) OnSubscribe(channel string, payload string) { +func (h *SubscriberHandlers) OnSubscribe(channel string, payload []byte) { }