Fix socket.connect_ex

This was implemented incorrectly in the initial rewrite. It should be fine now.