Skip to content

Commit

Permalink
Fix crash with older worker version requesting locustfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberw committed Nov 9, 2024
1 parent a8510a4 commit 5f41304
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 5f41304

Please sign in to comment.