mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 15:29:26 +01:00
Dispose of timer when creating new port polling Timer
This avoids having too many timers running at the same time. One could for instance update the `EnableRDPPolling` property from the `Options` dialog and start several concurrent `Timer`s Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
This commit is contained in:
parent
84e294b4b7
commit
60a5580d20
@ -772,6 +772,8 @@ namespace XenAdmin.ConsoleView
|
||||
if (Source == null || Source.IsControlDomainZero(out _))
|
||||
return;
|
||||
|
||||
_connectionPoller?.Dispose();
|
||||
|
||||
//Start the polling again
|
||||
_connectionPoller = !Source.IsHVM()
|
||||
? new Timer(PollVNCPort, null, RETRY_SLEEP_TIME, RDP_POLL_INTERVAL)
|
||||
|
Loading…
Reference in New Issue
Block a user