server-connection: Run the thread until it's stopped

Since std::c++ doesn't have semaphores, we use a local implementation.
Sigh.