Jan 27, 2012 at 8:40 AM
Edited Jan 27, 2012 at 8:43 AM
If I were to take a wild guess I would believe you use a two core machine, mdenkmaier, and you, Alex, one with four cores?
(Oh I've just noted you explizitly stated using a quad-core machine.)
I think I've identified an unexpected behavior in WebSocketServer.cs:
if (!int.TryParse(config.Options.GetValue("handshakePendingQueueCheckingInterval"), out m_HandshakePendingQueueCheckingInterval))
m_HandshakePendingQueueCheckingInterval = 60;// 1 minute default
if (!int.TryParse(config.Options.GetValue("handshakeTimeOut"), out m_HandshakePendingQueueCheckingInterval))
m_HandshakeTimeOut = 120;// 2 minute default
If no value for "handshakeTimeOut" is configured, m_HandshakePendingQueueCheckingInterval will be zero.
Later a Timer is created:
m_HandshakePendingQueueCheckingTimer = new Timer(HandshakePendingQueueCheckingCallback, null, m_HandshakePendingQueueCheckingInterval * 1000, m_HandshakePendingQueueCheckingInterval * 1000);
Since 0 * 1000 still is 0, the Timer will fire pretty much as fast as it can.
There is another issue:
In the timer's callback the timer will be disabled temporarily, and then startet again using:
Since the value of is not multiplied with 1000, the timeout interval specified in seconds will be interpreted as milliseconds, which will cause the event to fire more frequently than expected even if a value for m_HandshakePendingQueueCheckingTimer has explicitly
Edit: Not address Alex by his username; Add comment about "quad-core"