diff options
-rw-r--r-- | core/stream.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/stream.go b/core/stream.go index 363cc9f..2f639b0 100644 --- a/core/stream.go +++ b/core/stream.go @@ -70,6 +70,7 @@ func (c *Connection) Invoke(ctx context.Context, req api.Message, reply api.Mess if err != nil { return err } + defer func() { _ = stream.Close() }() if err := stream.SendMsg(req); err != nil { return err } |