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 (!re) {
if (auth.status!.noUser && prefs.getBool("skipCreateRootUser") == true) if (auth.status!.noUser && prefs.getBool("skipCreateRootUser") == true)
return; 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) { }).catchError((err) {
_authLog.log(Level.SEVERE, "Failed to check auth info:", err); _authLog.log(Level.SEVERE, "Failed to check auth info:", err);

View File

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