fix: synchronize server start / stop for multi-threading environment