Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
PlugFox committed Aug 4, 2023
1 parent d586ecc commit 9fa0dd1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/src/subscription/client_subscription_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,14 @@ abstract base class SpinifyClientSubscriptionBase
@internal
@mustCallSuper
Future<void> close([int code = 0, String reason = 'closed']) async {
if (!_state.isUnsubscribed)
if (!_state.isUnsubscribed) {
_setState(SpinifySubscriptionState.unsubscribed(
code: code,
reason: reason,
recoverable: false,
since: since,
));
}
_stateController.close().ignore();
}

Expand Down Expand Up @@ -308,8 +309,9 @@ base mixin SpinifyClientSubscriptionSubscribeMixin
recoverable: subscribed.recoverable,
ttl: subscribed.ttl,
));
if (subscribed.publications.isNotEmpty)
if (subscribed.publications.isNotEmpty) {
subscribed.publications.forEach(_handlePublication);
}
if (subscribed.expires) _setRefreshTimer(subscribed.ttl);
} on SpinifyException catch (error, stackTrace) {
unsubscribe(0, 'error while subscribing').ignore();
Expand Down

0 comments on commit 9fa0dd1

Please sign in to comment.