cURL Error: getsockname() failed with errno 22: Invalid argument