Hi,
I am running a B4J webapp server on one of my PCs.
I've had Internet Explorer and Chrome clients connected for a day or so with no issues.
However, when I connect with Firefox or Safari, the websocket session will almost always terminate in less than 10 minutes.
The B4J server will fire the WebSocket_Disconnected event.
On the client side, I added this code to the b4j_ws.js file:
However, this function never fires in the client, so the client will never know that the websocket session has terminated.
The problem is very puzzling to me because it seemingly only occurs in certain browsers.
I can try to post more code if needed.
Thanks for your input!
I am running a B4J webapp server on one of my PCs.
I've had Internet Explorer and Chrome clients connected for a day or so with no issues.
However, when I connect with Firefox or Safari, the websocket session will almost always terminate in less than 10 minutes.
The B4J server will fire the WebSocket_Disconnected event.
On the client side, I added this code to the b4j_ws.js file:
B4X:
b4j_ws.onclose = function(){
console.log('websocket disconnected!');
//try to reconnect in 10 seconds
setTimeout(function(){b4j_connect(absolutePath);}, 10000);
};
However, this function never fires in the client, so the client will never know that the websocket session has terminated.
The problem is very puzzling to me because it seemingly only occurs in certain browsers.
I can try to post more code if needed.
Thanks for your input!