Roughly 50% of the time when stopping the capture and starting the data receiving stage, it gets stuck. It looks like the problem might be in SocketListener::listenCapture(), specifically calling m_easySocket.receive(). The receive function will always return a -1 when it hangs like this.
The code block being referred to is this:
while (bytes < sizeof(profiler::net::Message))
{
int receivedBytes = m_easySocket.receive(buffer + seek + bytes, buffer_size);
if (receivedBytes < 1)
{
bytes = receivedBytes;
break;
}
bytes += receivedBytes;
}
Roughly 50% of the time when stopping the capture and starting the data receiving stage, it gets stuck. It looks like the problem might be in
SocketListener::listenCapture()
, specifically callingm_easySocket.receive()
. The receive function will always return a -1 when it hangs like this.The code block being referred to is this: