diff --git a/rpc/level0_test.go b/rpc/level0_test.go index 2b37d932..ef23877c 100644 --- a/rpc/level0_test.go +++ b/rpc/level0_test.go @@ -1798,7 +1798,7 @@ func TestHandleReturn_regression(t *testing.T) { defer release() _, err := f.Struct() - assert.NoError(t, err) + assert.ErrorIs(t, err, ctx.Err()) }) t.Run("BootstrapWithExpiredContext", func(t *testing.T) { @@ -1817,7 +1817,7 @@ func TestHandleReturn_regression(t *testing.T) { defer release() _, err := f.Struct() - assert.NoError(t, err) + assert.ErrorIs(t, err, ctx.Err()) }) } diff --git a/rpc/question.go b/rpc/question.go index 2e68306c..97725a4e 100644 --- a/rpc/question.go +++ b/rpc/question.go @@ -161,7 +161,7 @@ func (q *question) PipelineSend(ctx context.Context, transform []capnp.PipelineO q.c.questions[q2.id] = nil q.c.questionID.remove(uint32(q2.id)) }) - q.p.Reject(rpcerr.Failedf("send message: %w", err)) + q2.p.Reject(rpcerr.Failedf("send message: %w", err)) return }