return;
} catch (IOException e) { LogUtil.logThrowable(sessionID, "error processing message", e);
    public synchronized void next() throws IOException {        if (!enabled) {            if (isLoggedOn()) {                if (!state.isLogoutSent()) {                    getLog().onEvent("Initiated logout request");                    generateLogout(state.getLogoutReason());                }            } else {                return;            }        }        if (!checkSessionTime()) {            reset();            return;        }        if (!state.isLogonReceived()) {            if (state.isLogonSendNeeded()) {                if (generateLogon()) {                    getLog().onEvent("Initiated logon request");                } else {                    getLog().onEvent("Error during logon request initiation");                }            } else if (state.isLogonAlreadySent() && state.isLogonTimedOut()) {                getLog().onEvent("Timed out waiting for logon response");                disconnect();            }            return;        }        if (state.getHeartBeatInterval() == 0) {            return;        }        if (state.isLogoutTimedOut()) {            getLog().onEvent("Timed out waiting for logout response");            disconnect();        }        if (state.isWithinHeartBeat()) {            return;        }        if (state.isTimedOut()) {            getLog().onEvent("Timed out waiting for heartbeat");            disconnect();        } else {            if (state.isTestRequestNeeded()) {                generateTestRequest("TEST");                state.incrementTestRequestCounter();                getLog().onEvent("Sent test request TEST");            } else if (state.isHeartBeatNeeded()) {                generateHeartbeat();            }        }    }