This commit is contained in:
2024-05-28 01:26:16 +00:00
committed by GitHub
parent 1918a45bd2
commit 10a8e80762
2 changed files with 6 additions and 2 deletions

View File

@@ -357,7 +357,11 @@ void checkAuth(BuildContext context) {
if (!re) {
if (auth.status!.noUser && prefs.getBool("skipCreateRootUser") == true)
return;
context.push(auth.status!.noUser ? "/create_root_user" : "/login");
final loc = auth.status!.noUser ? "/create_root_user" : "/login";
final path = GoRouterState.of(context).path;
if (path != loc) {
context.push(loc);
}
}
}).catchError((err) {
_authLog.log(Level.SEVERE, "Failed to check auth info:", err);

View File

@@ -30,7 +30,7 @@ class TaskManager {
void clear() {
tasks.clear();
tasksList.clear();
_channel?.stream.drain();
_channel?.sink.add("{\"type\":\"close\"}");
_channel?.sink.close();
_closed = true;
}