Fix NPEs in blocking code

Oops; actually check if we're online before snagging the XMPP connection