X-Git-Url: https://gerrit.fd.io/r/gitweb?p=govpp.git;a=blobdiff_plain;f=core%2Fstream.go;fp=core%2Fstream.go;h=67236f1f2da8c992b9ef2fc1579bdb40236ab0ec;hp=2f639b01e8912d14a1aebf10d4ebd41fcf714b16;hb=b9aa34d5f77ac5969ad273bfd187ce5f9594b25e;hpb=000215c229d6df2c1a68b50847d8c7abf3842ce5 diff --git a/core/stream.go b/core/stream.go index 2f639b0..67236f1 100644 --- a/core/stream.go +++ b/core/stream.go @@ -56,7 +56,11 @@ func (c *Connection) NewStream(ctx context.Context, options ...api.StreamOption) option(s) } - s.channel = c.newChannel(s.requestSize, s.replySize) + ch, err := c.newChannel(s.requestSize, s.replySize) + if err != nil { + return nil, err + } + s.channel = ch s.channel.SetReplyTimeout(s.replyTimeout) // Channel.watchRequests are not started here intentionally, because