Note for the reviewer:
I tried to optimize the code by locking/unlocking the mutex explicitly exactly when it was needed (overall execution little bit faster), instead of deferring unlocking, which would make the code more elegant and easier to read. (overall execution little bit slower). Please let me know which way you would prefer.
Type of change
[x] Bug fix (non-breaking change that fixes an issue)
[ ] New feature (non-breaking change that adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Maintenance
[ ] New release
Related issues
Shortcut stories and GitHub issues (delete irrelevant)
Fix #346
Checklists
Development
[ ] Lint rules pass locally
[ ] The code changed/added as part of this pull request has been covered with tests
[ ] All tests related to the changed code pass in development
Code review
[ ] This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
[ ] "Ready for review" label attached to the PR and reviewers assigned
[ ] Issue from task tracker has a link to this pull request
[ ] Changes have been reviewed by at least one other engineer
Description of the change
Adding a proper mutex to read/write http headers.
Note for the reviewer: I tried to optimize the code by locking/unlocking the mutex explicitly exactly when it was needed (overall execution little bit faster), instead of deferring unlocking, which would make the code more elegant and easier to read. (overall execution little bit slower). Please let me know which way you would prefer.
Type of change
Related issues
Checklists
Development
Code review