mirror of https://github.com/grpc/grpc-dart.git
server: Cancel call when the outgoing messages are closed (#274)
This commit is contained in:
parent
ae17e712e4
commit
7d3b3749e8
|
|
@ -77,6 +77,9 @@ class ServerHandler_ extends ServiceCall {
|
||||||
.transform(grpcDecompressor())
|
.transform(grpcDecompressor())
|
||||||
.listen(_onDataIdle,
|
.listen(_onDataIdle,
|
||||||
onError: _onError, onDone: _onDoneError, cancelOnError: true);
|
onError: _onError, onDone: _onDoneError, cancelOnError: true);
|
||||||
|
_stream.outgoingMessages.done.then((_) {
|
||||||
|
cancel();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Cancel response subscription, if active. If the stream exits with an
|
/// Cancel response subscription, if active. If the stream exits with an
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue