Skip to content

Commit

Permalink
Inline capnp.ReleaseFunc in transport.NewMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
lthibault committed Feb 22, 2021
1 parent 0c0274e commit 279d335
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpc/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func NewPackedStreamTransport(rwc io.ReadWriteCloser) Transport {
// NewMessage allocates a new message to be sent.
//
// It is safe to call NewMessage concurrently with RecvMessage.
func (s *transport) NewMessage(ctx context.Context) (_ rpccp.Message, send func() error, release capnp.ReleaseFunc, _ error) {
func (s *transport) NewMessage(ctx context.Context) (_ rpccp.Message, send func() error, _ capnp.ReleaseFunc, _ error) {
// Check if stream is broken
if err := s.err.Load(); err != nil {
return rpccp.Message{}, nil, nil, err
Expand Down

0 comments on commit 279d335

Please sign in to comment.