quality: server_host and server_port are mutable global variables (not thread-safe) #44
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In src/client/client_cli.c:14-15, two global variables are defined:
These globals are:
This is not currently a data race because only the main thread modifies them before threads are created, but the design is fragile. Adding any feature that dynamically changes connection parameters could introduce threading bugs.
Better design: Pass server_host and server_port through the Config struct instead of using globals. The Config struct already exists and is passed through the pipeline context.
Severity: low