Correct the code.
This commit is contained in:
parent
f75767ea2a
commit
1df6a2e184
|
@ -128,10 +128,10 @@ class YoutubeHttpClient extends http.BaseClient {
|
|||
_validateResponse(response, response.statusCode);
|
||||
}
|
||||
final stream = StreamController<List<int>>();
|
||||
response.stream.listen((data) {
|
||||
bytesCount += data.length;
|
||||
stream.add(data);
|
||||
}, onError: (_) => null, onDone: stream.close, cancelOnError: false);
|
||||
response.stream.listen((data) {
|
||||
bytesCount += data.length;
|
||||
stream.add(data);
|
||||
}, onError: (_) => null, onDone: stream.close, cancelOnError: false);
|
||||
errorCount = 0;
|
||||
yield* stream.stream;
|
||||
} on Exception {
|
||||
|
|
Loading…
Reference in New Issue