Fixed a couple of socket state issues (and a deadlock) preventing Ebenezer (on Linux) from talking to the AI server.