2

I have a problem with WebSocket to work on Wildfly 10, every time that I try send a message from Wildfly to the browser the connection is closed showing an 1006 code.

@ServerEndpoint("/debugger")
public class SocketDebugger {
    @OnOpen
    public void onConnect(Session session) {
        session.setMaxIdleTimeout(0);
        try {
            session.getBasicRemote().sendText("Teste");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }   
}

This error does not occur if I open a WebSocket connection on a machine with Windows 7 or lower. Also on my machine with Windows 10, when I create a project using NodeJS Socket.IO communication works standard, this error happens with Java projects.

sinclair
  • 2,812
  • 4
  • 24
  • 53
João Pedro Schmitt
  • 1,046
  • 1
  • 11
  • 25

1 Answers1

2

I found the solution, Kaspersky had a block to the WebSocket communication.

João Pedro Schmitt
  • 1,046
  • 1
  • 11
  • 25