aboutsummaryrefslogtreecommitdiffstats
path: root/core/stream.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/stream.go')
-rw-r--r--core/stream.go6
1 files changed, 5 insertions, 1 deletions
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