fix race with getStore() (#45)

by calling it once before starting the server

closes: #44
This commit is contained in:
Zoe Zuser
2025-05-28 15:02:52 -04:00
committed by GitHub
parent 7b7cf5cd08
commit 1d21f73a2d
3 changed files with 10 additions and 0 deletions

View File

@@ -37,6 +37,12 @@ static ref<Store> getStore()
extern "C" {
// Must be called once before the server is stated to avoid races
void initStore()
{
getStore();
}
void freeString(struct string * const input)
{
free((void *) input->data);