public void sendToSubscribers(String text, Channel channelInfo) {
synchronized (channelInfo.wsSubscribers) {
Iterator<WebSocket> iterator = channelInfo.wsSubscribers.iterator();
while (iterator.hasNext()) {
WebSocket element = iterator.next();
if (element.isOpen()) {
try {
element.send(text);
} catch (Exception e) {
e.printStackTrace();
}
} else {
iterator.remove();