Fixed bad network stream read exceptions when the mqtt is disconnected either expected or unexpectedly.