
Previously, the server sometimes crashed due to concurrent writes to the websocket connection. Now, we ensure that only one concurrent function writes to the websocket at a time by enclosing the WriteMessage function with a mutex.
Previously, the server sometimes crashed due to concurrent writes to the websocket connection. Now, we ensure that only one concurrent function writes to the websocket at a time by enclosing the WriteMessage function with a mutex.