diff options
author | Loïc Hoguin <[email protected]> | 2022-12-12 14:38:43 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2022-12-12 14:38:43 +0100 |
commit | e6eaa24f504978eefd4d55be6b4899bd335e84f6 (patch) | |
tree | 500b6be5bf3e5b13f5df36648e248d9968d9067a /src/gun_tcp.erl | |
parent | c1f9122ab2a646df9182e51e3181de6ffa71af0c (diff) | |
download | gun-e6eaa24f504978eefd4d55be6b4899bd335e84f6.tar.gz gun-e6eaa24f504978eefd4d55be6b4899bd335e84f6.tar.bz2 gun-e6eaa24f504978eefd4d55be6b4899bd335e84f6.zip |
macOS: Error out on eaddrnotavail instead of retrying
This is to avoid reconnecting forever in a loop on bad
configuration (such as IP in a different subnet).
Diffstat (limited to 'src/gun_tcp.erl')
-rw-r--r-- | src/gun_tcp.erl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gun_tcp.erl b/src/gun_tcp.erl index 16d9e15..ffca8df 100644 --- a/src/gun_tcp.erl +++ b/src/gun_tcp.erl @@ -91,6 +91,7 @@ try_connect([], _, _, _, _, Error) -> Error. maybe_exit({error, einval}) -> exit(badarg); +maybe_exit({error, eaddrnotavail}) -> exit(badarg); maybe_exit(Error) -> Error. -spec send(inet:socket(), iodata()) -> ok | {error, atom()}. |