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 }