-
Notifications
You must be signed in to change notification settings - Fork 218
Open
Description
According to the specification, the connection object to be passed as input parameter in apns_connection:init/1 is:
-type connection() :: #{ name := name()
, apple_host := host()
, apple_port := inet:port_number()
, certdata => binary()
, certfile => path()
, keydata => keydata()
, keyfile => path()
, timeout => integer()
, type := type()
, proxy_info => proxy_info()
}.
As I read it, the field timeout
is optional, not mandatory. However, my apns_connection
crashes later when I attempt to send a push notification due to the fact it's not pattern matching correctly the field in:
apns4erl/src/apns_connection.erl
Line 311 in 10b88a8
#{timeout := Timeout} = Connection, |
I see two options:
- use
maps:find/3
providing a default value - in init, ensure the field is there or provide a default value
Metadata
Metadata
Assignees
Labels
No labels