mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-10-06 01:58:13 -07:00
misc: fix minor bugs (#906)
## Link to GitHub Issue or related Pull Request, if one exists n/a ## Description of change Fix hang when a DLL using the SDK calls `log_fatal` (deadlock) Fix spicecfg crashing if API server fails to bind (make websocket teardown conditional) ## Testing
This commit is contained in:
@@ -41,21 +41,21 @@ namespace api {
|
||||
bool pretty;
|
||||
|
||||
// server
|
||||
WebSocketController *websocket;
|
||||
WebSocketController *websocket = nullptr;
|
||||
std::vector<SerialController *> serial;
|
||||
std::vector<std::thread> server_workers;
|
||||
std::vector<std::thread> server_handlers;
|
||||
std::mutex server_handlers_m;
|
||||
std::vector<api::ClientState *> client_states;
|
||||
std::mutex client_states_m;
|
||||
SOCKET server;
|
||||
SOCKET server = INVALID_SOCKET;
|
||||
void server_worker();
|
||||
void connection_handler(ClientState client_state);
|
||||
|
||||
public:
|
||||
|
||||
// state
|
||||
bool server_running;
|
||||
bool server_running = false;
|
||||
|
||||
// constructor / destructor
|
||||
Controller(unsigned short port, std::string password, bool pretty);
|
||||
|
||||
Reference in New Issue
Block a user