Skip to content

Commit

Permalink
Merge pull request #288 from poppingmoon/fix-reconnect
Browse files Browse the repository at this point in the history
SocketController.reconnectが失敗したときにstartTimeLineする
  • Loading branch information
shiosyakeyakini-info authored Sep 9, 2023
2 parents 1f52201 + 9aa4fda commit c149429
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/repository/socket_timeline_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,16 @@ abstract class SocketTimelineRepository extends TimelineRepository {
@override
void reconnect() {
super.reconnect();
socketController?.reconnect();
try {
socketController!.reconnect();
} catch (e) {
socketController = null;
Future(() async {
await misskey.streamingService.restart();
startTimeLine();
});
return;
}
mainStreamRepository.reconnect();
reloadLatestNotes();
}
Expand Down

0 comments on commit c149429

Please sign in to comment.