Fix shutdown of config server: accept() would block, so instead use poll() with a timeout.