Fix socket connection return codes.