Good day! I did not get an answer to my previous question . I will try again. The select function is called in a loop. And on different operating systems (particularly in Win7), it can randomly cause an exception. By trial and error, a crutch was coined as a call to Sleep (1) before calling select (). In this case, the program works stably. But the crutch is not an option and I would like to understand why this is happening. Perhaps you need to set some parameters for the socket?
Another small clarification about what the program does. In essence, this is an ssh-tunnel to the remote service. In this particular case, when the program crashes with a crit, I run mstsc (RDP client). The error may always pops up after authorization already on the rdp server, but not always immediately, sometimes the desktop may have time to load.
I would be grateful for any information that will help at least come close to the clue =)
Thank!