nodename nor servname provided, or not known
AMBIENTE1 opened this issue · 2 comments
Hallo,
I updated my Xcode app from project format 9.4 and PostgesClientKit 1.1.1 to project format 12.0 and PostgesClientKit 1.3.0.
Now when I switch LAN off and try connect via PostgesClientKit to Postgresql database:
Connection-2 severe] Unable to connect socket: Error code: -9989(0x-2705), nodename nor servname provided, or not known
and app crash: Thread 1: EXC_BAD_ACCESS (code=2, address=0x7ffeee7dae90)
var status: Int32 = getaddrinfo(host, String(port), &hints, &targetInfo)
why does not working catch { print(error) } after timeout ??
Looks like the hostname or IP address can't be resolved. So the first thing that I would check is the value of the ConnectionConfiguration host property.
The "Connection-2 severe" log entry indicates a Swift error is has been caught will be re-thrown. But before this happens, the EXC_BAD_ACCESS signal is raised, causing execution to terminate. I don't know why this is happening.
If you'd like me to investigate further, please post your code and describe your environment. What do you mean by "switch LAN off"?
Thanks for your answer.
There is no need for a solution, I managed it differently. LAN OFF by this I meant a network connection failure simulation.