Check whether socket is still open

We're in `connected` state here, though. Surely this really *is* an error condition? It means our socket connection state is out of sync with our fsm state, but we didn't receive any other errors.

I think we should either:
 - continue under the assumption we're connected; OR
 - if we are hitting `{error, closed}` here, and it's not a recoverable bug that should have been handled elsewhere, call the `Handler:ondisconnect/2` callback at this point.

Do you have a test case you can share that triggers the behaviour you're trying to fix?