electricsheep icon indicating copy to clipboard operation
electricsheep copied to clipboard

Download of sheep

Open roever opened this issue 7 years ago • 1 comments

Hi,

In the file Networking.cpp in line 242 there in a bug. The return value of select is checked for EINTR. When an error occures select will return -1 and then you have to check errno. As the code stands downloads will be interrupted for no reason when and EINTR even happens. This makes downloading sheep a game of chance and places an unnecessary load on the server

Instead of this

#ifndef WIN32 if ( err != EINTR ) { return false; } #endif

the code should be

#ifndef WIN32 if ( errno != EINTR ) { return false; } #endif

roever avatar Dec 08 '17 20:12 roever

Thanks roever,

I've incorporated this fix into the codebase. I'll close this issue when I am finished testing.

dasvo avatar Dec 18 '17 20:12 dasvo