1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-01-13 01:20:58 +00:00

Fix IOU node start

This commit is contained in:
grossmj 2024-12-17 16:24:42 +07:00
parent 014d3f2ad9
commit c820a807ad
No known key found for this signature in database
GPG Key ID: 1E7DD6DBB53FF3D7

View File

@ -572,13 +572,13 @@ class Node:
Start a node
"""
try:
# For IOU we need to send the licence everytime (if enabled)
# For IOU: we need to send the licence everytime we start a node
if self.node_type == "iou":
license_check = self._project.controller.iou_license.get("license_check")
iourc_content = self._project.controller.iou_license.get("iourc_content")
if license_check:
data = {"license_check": license_check, "iourc_content": iourc_content}
await self.post("/start", data=data, timeout=240)
license_check = self._project.controller.iou_license.get("license_check", True)
iourc_content = self._project.controller.iou_license.get("iourc_content", None)
await self.post("/start", timeout=240, data={"license_check": license_check, "iourc_content": iourc_content})
else:
await self.post("/start", data=data, timeout=240)
except asyncio.TimeoutError:
raise ControllerTimeoutError(f"Timeout when starting {self._name}")