1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-25 01:38:08 +00:00

Merge remote-tracking branch 'origin/2.2' into 2.2

This commit is contained in:
grossmj 2022-08-28 22:32:49 +02:00
commit 4ddce880ea

View File

@ -367,9 +367,6 @@ class Compute:
log.warning("Cannot connect to compute '{}': {}".format(self._id, e)) log.warning("Cannot connect to compute '{}': {}".format(self._id, e))
# Try to reconnect after 5 seconds if server unavailable only if not during tests (otherwise we create a ressource usage bomb) # Try to reconnect after 5 seconds if server unavailable only if not during tests (otherwise we create a ressource usage bomb)
if not hasattr(sys, "_called_from_test") or not sys._called_from_test: if not hasattr(sys, "_called_from_test") or not sys._called_from_test:
if self.id != "local" and self.id != "vm" and not self._controller.compute_has_open_project(self):
log.warning("Not reconnecting to compute '{}' because there is no project opened on it".format(self._id))
return
self._connection_failure += 1 self._connection_failure += 1
# After 5 failure we close the project using the compute to avoid sync issues # After 5 failure we close the project using the compute to avoid sync issues
if self._connection_failure == 10: if self._connection_failure == 10: