sociomantic-tsunami / dhtproto

Distributed Hash Table protocol definition, client, fake node, and tests
Boost Software License 1.0
5 stars 22 forks source link

Fix "race condition" in mirror helper #197

Closed matthias-wende-sociomantic closed 5 years ago

matthias-wende-sociomantic commented 5 years ago

Assigning a request and changing the state are assumed to be one atomic operation. However assign calls other functions that might lead into situations where the state is checked although not yet changed. Interchanging these commands solves this problem in the given non threaded environments.

gavin-norman-sociomantic commented 5 years ago

Please merge when the CI passes :)