@@ -72,8 +72,11 @@ type Conn struct {
72
72
er errReporter
73
73
abortTimeout time.Duration
74
74
75
- // bgctx is a Context that is canceled when shutdown starts.
75
+ // bgctx is a Context that is canceled when shutdown starts. Note
76
+ // that it's parent is context.Background(), so we can rely on this
77
+ // being the *only* time it will be canceled.
76
78
bgctx context.Context
79
+
77
80
// tasks block shutdown.
78
81
tasks sync.WaitGroup
79
82
closed chan struct {} // closed when shutdown() returns
@@ -619,7 +622,7 @@ func (c *Conn) handleBootstrap(ctx context.Context, id answerID) error {
619
622
)
620
623
621
624
syncutil .Without (& c .lk , func () {
622
- ans .ret , ans .sendMsg , ans .msgReleaser , err = c .newReturn (ctx )
625
+ ans .ret , ans .sendMsg , ans .msgReleaser , err = c .newReturn ()
623
626
if err == nil {
624
627
ans .ret .SetAnswerId (uint32 (id ))
625
628
ans .ret .SetReleaseParamCaps (false )
@@ -694,7 +697,7 @@ func (c *Conn) handleCall(ctx context.Context, call rpccp.Call, releaseCall capn
694
697
695
698
// Create return message.
696
699
c .lk .Unlock ()
697
- ret , send , retReleaser , err := c .newReturn (ctx )
700
+ ret , send , retReleaser , err := c .newReturn ()
698
701
if err != nil {
699
702
err = rpcerr .Annotate (err , "incoming call" )
700
703
syncutil .With (& c .lk , func () {
0 commit comments