data.append(msg);
}
try {
dataHandler.onWriteData(continuation.getServletResponse(), data.toString());
} catch (IOException e) {
throw new SocketIOException(e);
}
if (!dataHandler.isConnectionPersistent() && !continuation.isInitial()) {
Continuation cont = continuation;
continuation = null;
cont.complete();
} else {
getSession().startHeartbeatTimer();
}
} else {
String data = frame.encode();
if (!buffer.putMessage(data, maxIdleTime)) {
getSession().onDisconnect(DisconnectReason.TIMEOUT);
abort();
throw new SocketIOException();
}
}
} else {
throw new SocketIOClosedException();
}