Break out of server connection loop if it is not started or running
Use a blocking queue to avoid a busy-wait loop
Break out of client connection loop if it is not started or running