Threading issues in hub management
Bug #1194299 reported by
maksis
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DC++ |
Fix Released
|
High
|
Unassigned |
Bug Description
AdcHub::info is called from various different threads (timer, refresh, hub, GUI) but it's not thread safe. lastInfoMap is unprotected while it can be modified from different threads simultaneously. This has been fixed in AirDC++ by syncing the info calls from other threads to the hub thread.
Client:
To post a comment you must log in.
both functions are only called from ClientManager under a locked mutex so it's safe. they are public indeed, which might raise some questions; but the only way for an external party to get a Client instance is to call ClientManager: :getClients( ) which is documented as requiring a lock, so that's safe too.