We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To reproduce: run TestHandleReturn_regression in level0_test.go, under the bug/bootstrap-panic branch.
TestHandleReturn_regression
level0_test.go
bug/bootstrap-panic
func TestPanic(t *testing.T) { p1, p2 := transport.NewPipe(1) srv := testcp.PingPong_ServerToClient(pingPongServer{}, nil) conn1 := rpc.NewConn(rpc.NewTransport(p2), &rpc.Options{ BootstrapClient: srv.Client, }) defer conn1.Close() conn2 := rpc.NewConn(rpc.NewTransport(p1), nil) defer conn2.Close() pp := testcp.PingPong{Client: conn2.Bootstrap(context.Background())} defer pp.Release() // create an EXPIRED context ctx, cancel := context.WithCancel(context.Background()) cancel() f, release := pp.EchoNum(ctx, func(ps testcp.PingPong_echoNum_Params) error { ps.SetN(42) return nil }) defer release() _, err := f.Struct() // BANG! assert.NoError(t, err) }
panic: Promise.Fulfill called after Fulfill or Reject goroutine 15 [running]: capnproto.org/go/capnp/v3.(*Promise).Fulfill(0x0?, {0xc000132570, 0x0, 0x0, {0x0, 0x0}, 0x0, 0x80}) /Users/lthibault/Go/src/capnproto.org/go/capnp/answer.go:132 +0x135 capnproto.org/go/capnp/v3/rpc.(*Conn).handleReturn.func2.2() /Users/lthibault/Go/src/capnproto.org/go/capnp/rpc/rpc.go:952 +0x53 capnproto.org/go/capnp/v3/internal/syncutil.Without({0x12f3fb0, 0xc000120cd8}, 0xc000049f60) /Users/lthibault/Go/src/capnproto.org/go/capnp/internal/syncutil/with.go:19 +0x8c capnproto.org/go/capnp/v3/rpc.(*Conn).handleReturn.func2() /Users/lthibault/Go/src/capnproto.org/go/capnp/rpc/rpc.go:951 +0x21e created by capnproto.org/go/capnp/v3/rpc.(*Conn).handleReturn /Users/lthibault/Go/src/capnproto.org/go/capnp/rpc/rpc.go:947 +0x697 FAIL capnproto.org/go/capnp/v3/rpc 0.198s FAIL
The text was updated successfully, but these errors were encountered:
Fix capnproto#271
8e98235
779b538
Merge pull request #288 from zenhack/fix-271
e667e0d
Fix #271
No branches or pull requests
To reproduce: run
TestHandleReturn_regression
inlevel0_test.go
, under thebug/bootstrap-panic
branch.The text was updated successfully, but these errors were encountered: