What might be the reason for events to stop being received? I’m using a TROEventReceiver and activating a long job on the server (maybe as long as an hour!) and I’ve found if it is too long, the client stops receiving the messages so it never knows the job gets completed.
I’ve built a variation of the chat demo that does this, and the server carries on sending the messages but the client stop receiving the message after 30 mins. Using a TROSynapseSuperTCPChannel.
I’m using TROInMemorySessionManager, TROInMemoryEventRepository and I’ve not tried the indy channel, but that’s an interesting question of the session duration.
I think it is the session duration. I think I thought that because the events were being sent to the client that the session wouldn’t timeout but perhaps it does, and I need to send regular keep alive calls to the server (I have these built in for when the client sits quietly doing nothing anyway).
I’ll investgate that, and if can’t resolve it I’ll send you the test case I’ve built.
SuperTCPChannelChat_Server.zip (70.5 KB)
Here is a test case. I think it is related to the session duration. I set it (and the check interval) to 5 on the session manager, and it stops after 10 mins. Previously, when it was set to 15 mins, it stopped after 30 mins.
If you run the server, and open a client, after it logs in, click the ‘go regular’ button and the server will send regular messages for a while (based on the two spin editor values). After a period of time, they stop receiving the messages. 10 mins currently, as I say.
Thanks, I’ve just come to the same conclusion. I’ve fixed it by creating a timer that sends a regular keep alive message to the server whilst it waits for the conclusion of the long server process (60 mins in the sample there^) and it now sends those regular messages back to the client.
As I said, I thought that the session wouldn’t time out as there are regular updates going to the client but obviously that’s not the case.
I didn’t realise it could be that simple, but I prefer the option of the client pinging the server to say it’s still alive - plus I’ve picked up what you showed above (CheckSessionIsExpired), so that if the client has gone for any reason, the server can stop doing the work as it’s a very intensive process.