Skip to content

Commit

Permalink
test stream sendMsg
Browse files Browse the repository at this point in the history
  • Loading branch information
tspiridonova committed Mar 10, 2021
1 parent d5b6288 commit fdf81dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
10 changes: 7 additions & 3 deletions stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -1581,9 +1581,13 @@ func prepareMsg(m interface{}, codec baseCodec, cp Compressor, comp encoding.Com
}
// The input interface is not a prepared msg.
// Marshal and Compress the data at this point
data, err = encode(codec, m)
if err != nil {
return nil, nil, nil, err
var ok bool
data, ok = m.([]byte)
if !ok {
data, err = encode(codec, m)
if err != nil {
return nil, nil, nil, err
}
}
compData, err := compress(data, cp, comp)
if err != nil {
Expand Down

0 comments on commit fdf81dc

Please sign in to comment.