-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Continuous Connection request to server from engine.io-client #20
Comments
Seems like the server isn't handling websocket connections. |
Also, enable async support on the servlet to enable delayed responses and not have too many requests hitting the server. |
ApplicationServerConfig.getEndpointConfigs is called and entered inside below block
But Front doesn't receive a message emitted from server. Enabled async support on the servlet to enable delayed responses, but still, UI is trying to establish the connection. |
@trinopoty One More point for your analysis,
As per the document, mEngineIoServer is declared but not initialized so it end-up in null pointer exception inside onOpen method block. So now I have initialized it, but still the same problem occurs no message received at front and connection keep on requested from UI |
Ah I see. You have to get it in from somewhere that you initialized. |
Ya, exactly its not helping to meet my use case, so what would be exact implementation to kick-start the process :) |
One possible solution is to declare |
Ok Sure, let try that too and post the update. I appreciate your very quick response. Thanks 👍 |
@trinopoty That worked ! referring the Now, i try to emit the message from
|
@trinopoty One more input, I just put sysout inside the
|
You have |
Also, you can't send a message from the |
After moved the connection listener to postconstruct layer everything in order now. Thanks. Herewith attached the working sample which could be helpful for someone. Also, request you update the document section so that you save your valuable time. |
Server: Wildfly 10.1
Browser: Chrome
Frontend: Reactjs
Socket server: engine.io-server-java V 1.3.4
Socket client: engine.io-client V 3.4.0
Issue: When the UI is launched, engine.io triggers the connection request to the sever. When checking the sever log connection request is reached the servlet, now the issue is client is continuously sending the connection request to servlet and WebSocket connection is not establishing it goes like a never-ending process. Attacthed the source for the reference please check and advice want went wrong in the code.
Project Structure:
ReactJS as front-end:
App.JS
EngineIoServlet -
ApplicationServerConfig
EngineIoEndpoint
The text was updated successfully, but these errors were encountered: