Current section

57 Versions

Jump to

Compare versions

4 files changed
+10 additions
-6 deletions
  @@ -1,4 +1,4 @@
1 - Copyright (c) 2015 Codedge LLC
1 + Copyright (c) 2015-2018 Codedge LLC (https://www.codedge.io/)
2 2
3 3 Permission is hereby granted, free of charge, to any person obtaining a copy
4 4 of this software and associated documentation files (the "Software"), to deal
  @@ -51,4 +51,4 @@
51 51 {<<"optional">>,false},
52 52 {<<"repository">>,<<"hexpm">>},
53 53 {<<"requirement">>,<<"~> 1.5.0">>}]]}.
54 - {<<"version">>,<<"1.2.3">>}.
54 + {<<"version">>,<<"1.2.4">>}.
  @@ -155,11 +155,15 @@ defmodule Pigeon.ADM.Worker do
155 155
156 156 _ ->
157 157 fn {reg_id, payload} ->
158 - {:ok, %HTTPoison.Response{status_code: status, body: body}} =
159 - HTTPoison.post(adm_uri(reg_id), payload, adm_headers(state))
160 -
158 + case HTTPoison.post(adm_uri(reg_id), payload, adm_headers(state)) do
159 + {:ok, %HTTPoison.Response{status_code: status, body: body}} ->
161 160 notification = %{notification | registration_id: reg_id}
162 161 process_response(status, body, notification, on_response)
162 +
163 + {:error, %HTTPoison.Error{reason: :connect_timeout}} ->
164 + notification = %{notification | response: :timeout}
165 + process_on_response(on_response, notification)
166 + end
163 167 end
164 168 end
  @@ -1,7 +1,7 @@
1 1 defmodule Pigeon.Mixfile do
2 2 use Mix.Project
3 3
4 - @version "1.2.3"
4 + @version "1.2.4"
5 5
6 6 def project do
7 7 [