0 votes
by (2.2k points)

Hi

In the previous version (7.x), setting the WebSocket's KeepAliveInterval to 10 minutes caused no issues.
Poll(1000) did not throw exceptions, and the system operated normally.
I maintain the Ping/Pong connection by sending a separate message every 10 minutes.

In the new version (8.0.9709), however, an exception occurs after 2 minutes during Poll(1000), with the error message: "The operation was not completed within the specified time limit."
There are no issues if the KeepAliveInterval is set to 30 seconds in the new version.

What steps should I take to continue using a 10-minute KeepAliveInterval in the new version without encountering this issue, just as in the previous version?

Thank you

Applies to: Rebex WebSocket

1 Answer

0 votes
by (78.7k points)

Hello,

can you please post here (or send it to support@rebex.net) a code to reproduce the issue? I have tried the code below via ws:// and wss:// protocols with no issues:

using (var client = new WebSocketClient())
{
    client.LogWriter = new FileLogWriter(@"c:\logs\ws.log", LogLevel.Debug);
    client.Options.KeepAliveInterval = new TimeSpan(0, 10, 0);

    client.Connect("wss://testserver");

    // run the loop for 13 minutes
    for (int seconds = 0; seconds < 13 * 60; seconds++)
    {
        if (client.Poll(1000))
        {
            throw new ApplicationException("An unexpected message received.");
        }
    }
}

Does the code above works with your server? If not, can you please, send us the produced log file (c:\logs\ws.log)?

by (2.2k points)
I have sent the logs via email.
by (78.7k points)
Thank you for the log file. We were able to reproduce the issue locally. We will fix it ASAP.

Note: The issue is related to `wss://` only.
...