mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 22:55:24 +00:00
fix(status): skip TCP probes while host sessions are active (#1538)
This commit is contained in:
1 parent
bd0858b5a2
commit
dc5d57c012
6 files changed
+50
-8
No files matched your search
@@ -11,6 +11,10 @@ export class HostSessionStatus {
|
||||
private counts = new Map<number, number>();
|
||||
private listeners = new Set<HostSessionStatusListener>();
|
||||
|
||||
hasActiveSession(hostId: number): boolean {
|
||||
return (this.counts.get(hostId) ?? 0) > 0;
|
||||
}
|
||||
|
||||
register(hostId: number): () => void {
|
||||
const count = this.counts.get(hostId) ?? 0;
|
||||
this.counts.set(hostId, count + 1);
|
||||
|
||||
Reference in new issue
Block a user