etr / libhttpserver

C++ library for creating an embedded Rest HTTP server (and more)
GNU Lesser General Public License v2.1
882 stars 184 forks source link

Fix webserver thread safety #330

Open FlorianChevassu opened 1 year ago

FlorianChevassu commented 1 year ago

Identify the Bug

https://github.com/etr/libhttpserver/issues/329

Description of the Change

This pull request introduces the usage of locks in the werbserver class in order to protect member variables from data races.

Alternate Designs

N/A

Possible Drawbacks

This might slightly increase response time, but should not be noticeable.

Verification Process

N/A

Release Notes

Fixed an issue where multiple threads did access webserver member variables concurrently, leading to data races.

etr commented 1 year ago

Overall, it looks good - just a few minor comments

etr commented 1 year ago

It looks like the PR is failing at compiling

FlorianChevassu commented 11 months ago

It looks like the PR is failing at compiling

Sorry about the delay. Should be fixed now.