only set state to offline on network errors