Skip to content

Commit

Permalink
Prevent dispose from hanging
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanheise committed Aug 8, 2020
1 parent 858c6c0 commit fc9e6e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,9 @@ public void dispose() {
player = null;
transition(ProcessingState.none);
}
if (eventSink != null) {
eventSink.endOfStream();
}
onDispose.run();
}

Expand Down
3 changes: 0 additions & 3 deletions lib/just_audio.dart
Original file line number Diff line number Diff line change
Expand Up @@ -567,14 +567,11 @@ class AudioPlayer {
_proxy?.stop();
await _durationSubject.close();
await _eventChannelStreamSubscription.cancel();
await _playbackEventSubject.close();
await _loopModeSubject.close();
await _shuffleModeEnabledSubject.close();
await _playingSubject.close();
await _volumeSubject.close();
await _speedSubject.close();
await _playerStateSubject.drain();
await _playerStateSubject.close();
if (_positionSubject != null) {
await _positionSubject.close();
}
Expand Down

0 comments on commit fc9e6e0

Please sign in to comment.