session: check session error in blocking_flush