Skip to content

Commit

Permalink
Fix #410: skip iteration when visiting tree in SocketFacesListener
Browse files Browse the repository at this point in the history
  • Loading branch information
BalusC committed Nov 3, 2017
1 parent 575f3fe commit 6686be2
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -13,6 +13,7 @@
package org.omnifaces.cdi.push;

import static java.lang.String.format;
import static javax.faces.component.visit.VisitHint.SKIP_ITERATION;
import static org.omnifaces.cdi.push.SocketChannelManager.ESTIMATED_TOTAL_CHANNELS;
import static org.omnifaces.util.Ajax.oncomplete;
import static org.omnifaces.util.Components.addScriptToBody;
Expand Down Expand Up @@ -76,7 +77,7 @@ public void processEvent(SystemEvent event) {
final FacesContext context = FacesContext.getCurrentInstance();
final Map<String, Boolean> sockets = getSockets(context);

forEachComponent(context).ofTypes(Socket.class).invoke(new Callback.WithArgument<Socket>() { @Override public void invoke(Socket socket) {
forEachComponent(context).ofTypes(Socket.class).withHints(SKIP_ITERATION).invoke(new Callback.WithArgument<Socket>() { @Override public void invoke(Socket socket) {
if (!sockets.containsKey(socket.getChannel())) {
return;
}
Expand Down

0 comments on commit 6686be2

Please sign in to comment.