From f90f83fbda92d6def3b0d6acc5ac12b12af48e14 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Fri, 29 Apr 2022 23:32:10 +0800 Subject: [PATCH] more friendly to 0 connections if any unknow happend --- src/ui/cm.tis | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ui/cm.tis b/src/ui/cm.tis index ab3f22f12..931f64d92 100644 --- a/src/ui/cm.tis +++ b/src/ui/cm.tis @@ -13,7 +13,10 @@ class Body: Reactor.Component } function render() { - if (connections.length == 0) return
; + if (connections.length == 0) + return
+ Waiting for new connection ... +
; var c = connections[this.cur]; this.connection = c; this.cid = c.id; @@ -360,7 +363,10 @@ function updateTime() { updateTime(); +var tm0 = getTime(); + function self.closing() { + if (connections.length == 0 && getTime() - tm0 > 30000) return true; view.windowState = View.WINDOW_HIDDEN; return false; }