I'm not a networking guy, but wouldn't `ECONNRESET` be `WSAECONNRESET` on Windows?
I think the code would be more readable if the non-windows error code parsing would go into the #ifdef's #else clause, and the regular if clause in L233 would then just check for `aborted`, instead of having another `errorCode` check in there.