Given the following code snippet:
gun:open(Host, Port, #{})
gun:ws_upgrade(Pid, Url, [], #{keepalive=> infinity})
The keepalive continues to use the default value, and a keepalive is sent after 5 seconds.
The following correctly sets the keepalive value:
gun:open(Host, Port, #{ws_opts => #{keepalive => infinity}})
gun:ws_upgrade(Pid, Url, [], #{})