Skip to content

Return close error in streamrpc.Call

Follow-up to !3601 (comment 614813764)

In an earlier iteration of this code we returned an open connection so there was no final close (but there was a deferred "if err != nil, close"). Then the method changed to take a callback and no longer return the open connection. In that scenario, it is more natural to explicitly close at the end of the method. This change adds that explicit close.

Note that this does not fix a leak because there was no leak; this change is only about letting the close error bubble up.

Edited by Jacob Vosmaer

Merge request reports

Loading