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);
|
_validateResponse(response, response.statusCode);
|
||||||
}
|
}
|
||||||
final stream = StreamController<List<int>>();
|
final stream = StreamController<List<int>>();
|
||||||
response.stream.listen((data) {
|
response.stream.listen((data) {
|
||||||
bytesCount += data.length;
|
bytesCount += data.length;
|
||||||
stream.add(data);
|
stream.add(data);
|
||||||
}, onError: (_) => null, onDone: stream.close, cancelOnError: false);
|
}, onError: (_) => null, onDone: stream.close, cancelOnError: false);
|
||||||
errorCount = 0;
|
errorCount = 0;
|
||||||
yield* stream.stream;
|
yield* stream.stream;
|
||||||
} on Exception {
|
} on Exception {
|
||||||
|
|
Loading…
Reference in New Issue