private void changeToDemandState(State oldState) { if (changeState(oldState, State.DEMAND)) { // Protect from infinite recursion in Undertow, where we can't check if data // is available, so all we can do is to try to read. // Generally, no need to check if we just came out of readAndPublish()... if (!oldState.equals(State.READING)) { checkOnDataAvailable(); } } }
private void changeToDemandState(State oldState) { if (changeState(oldState, State.DEMAND)) { // Protect from infinite recursion in Undertow, where we can't check if data // is available, so all we can do is to try to read. // Generally, no need to check if we just came out of readAndPublish()... if (!oldState.equals(State.READING)) { checkOnDataAvailable(); } } }
private void changeToDemandState(State oldState) { if (changeState(oldState, State.DEMAND)) { // Protect from infinite recursion in Undertow, where we can't check if data // is available, so all we can do is to try to read. // Generally, no need to check if we just came out of readAndPublish()... if (!oldState.equals(State.READING)) { checkOnDataAvailable(); } } }