Issue #23618: Enhance EINTR handling in socket.connect()

Call PyErr_CheckSignals() immediatly if connect() or select() fails with EINTR
in internal_connect().

Refactor also the code to limit indentaton and make it more readable.
1 file changed