Skip to content

Commit

Permalink
Merge pull request #2976 from locustio/fix-crash-with-older-worker-ve…
Browse files Browse the repository at this point in the history
…rsion-requesting-locustfile

Fix crash with older worker version requesting locustfile from master
  • Loading branch information
cyberw authored Nov 9, 2024
2 parents a8510a4 + 5f41304 commit f858c0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion locust/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,9 @@ def client_listener(self) -> NoReturn:
# if abs(time() - msg.data["time"]) > 5.0:
# warnings.warn("The worker node's clock seem to be out of sync. For the statistics to be correct the different locust servers need to have synchronized clocks.")
elif msg.type == "locustfile":
if msg.data["version"][0:4] == __version__[0:4]:
if not msg.data["version"]:
logger.error("A very old worker version requested locustfile. This probably won't work.")
elif msg.data["version"][0:4] == __version__[0:4]:
logger.debug(
f"A worker ({msg.node_id}) running a different patch version ({msg.data['version']}) connected, master version is {__version__}"
)
Expand Down

0 comments on commit f858c0e

Please sign in to comment.