diff --git a/lib/httparrot.ex b/lib/httparrot.ex index fa1a1f4..72092dc 100644 --- a/lib/httparrot.ex +++ b/lib/httparrot.ex @@ -89,9 +89,9 @@ defmodule HTTParrot do end end - defp unix_socket_supported? do - case Integer.parse("#{:erlang.system_info(:otp_release)}") do - {n, _} when n >= 19 -> true + def unix_socket_supported? do + case {:os.type, Integer.parse("#{:erlang.system_info(:otp_release)}")} do + {{:unix, _}, {n, _}} when n >= 19 -> true _ -> false end end