grpc / grpc/grpc-java

DelayedStream.setStream() should cancel the provided stream if not using it

Aperta
#1,537 4 commenti 0 reazioni 1 assegnatario Rivendicata da @zhangkun83 Vedi su GitHub
code health
Lingua principale
Java
Stelle
12.1k
Fork
4k
Merge medio
2g 17h
PR unite (30g)
37

Descrizione

If `cancel()` or `setStream()` was previously called then `setStream()` throws away the stream argument. It should `cancel()` the stream to make sure resources are freed, although I think only DelayedClientTransport benefits.

This should not be done until after #1536. I don't know if OkHttp suffers a similar problem. If so, we may want to revisit whether it makes sense to allow streams to be cancelled before `start()`.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.