From 74f562bb0ba96fc9bc914dbb5a9f9ebe70cd2832 Mon Sep 17 00:00:00 2001 From: Eruvanos Date: Thu, 13 Jun 2019 19:33:23 +0200 Subject: [PATCH] Use MsgPack extension to be compatible to zerorpc.io Fix compatibility issue with https://zerorpc.io and Python 3 --- channel.go | 2 +- event.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/channel.go b/channel.go index 4975f1b..12e7dc8 100644 --- a/channel.go +++ b/channel.go @@ -104,7 +104,7 @@ func (ch *channel) sendEvent(e *Event) error { } if ch.Id != "" { - e.Header["response_to"] = ch.Id + e.Header["response_to"] = []byte(ch.Id) } else { ch.Id = e.Header["message_id"].(string) diff --git a/event.go b/event.go index 8edae65..2f3de3a 100644 --- a/event.go +++ b/event.go @@ -49,7 +49,7 @@ func (e *Event) packBytes() ([]byte, error) { var buf []byte - enc := codec.NewEncoderBytes(&buf, &codec.MsgpackHandle{}) + enc := codec.NewEncoderBytes(&buf, &codec.MsgpackHandle{WriteExt:true}) if err := enc.Encode(data); err != nil { return nil, err }