From b2e8461af5adce215c7f122484ef3783c326499d Mon Sep 17 00:00:00 2001 From: Ricardo Hermida Ruiz Date: Wed, 26 Oct 2016 20:04:19 -0200 Subject: [PATCH] Do not support unix sockets on windows --- lib/httparrot.ex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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