{"action":"opened","issue":{"url":"https://api.github.com/repos/meh/reagent/issues/11","repository_url":"https://api.github.com/repos/meh/reagent","labels_url":"https://api.github.com/repos/meh/reagent/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/meh/reagent/issues/11/comments","events_url":"https://api.github.com/repos/meh/reagent/issues/11/events","html_url":"https://github.com/meh/reagent/issues/11","id":345412127,"node_id":"MDU6SXNzdWUzNDU0MTIxMjc=","number":11,"title":"Reagent.Listener terminate by msg {#Reference<.....>, :badarg}","user":{"login":"zhangji00","id":6804857,"node_id":"MDQ6VXNlcjY4MDQ4NTc=","avatar_url":"https://avatars2.githubusercontent.com/u/6804857?v=4","gravatar_id":"","url":"https://api.github.com/users/zhangji00","html_url":"https://github.com/zhangji00","followers_url":"https://api.github.com/users/zhangji00/followers","following_url":"https://api.github.com/users/zhangji00/following{/other_user}","gists_url":"https://api.github.com/users/zhangji00/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangji00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangji00/subscriptions","organizations_url":"https://api.github.com/users/zhangji00/orgs","repos_url":"https://api.github.com/users/zhangji00/repos","events_url":"https://api.github.com/users/zhangji00/events{/privacy}","received_events_url":"https://api.github.com/users/zhangji00/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-28T02:59:04Z","updated_at":"2018-07-28T02:59:04Z","closed_at":null,"author_association":"NONE","body":"Linux ubuntu-4vcpu-8gb 4.4.0-130-generic\r\nElixir 1.5.3\r\nErlang/OTP 20\r\n\r\nCauldron 0.1.10\r\nReagent 0.1.14\r\nSocket 0.3.12\r\n\r\nthe :badarg occurs when the Reagent.Listener try to close connection in its\r\nhandle_info({ :DOWN, ref, _type, _object, _info }, self). because the module doesn't handle this :badarg msg, so the Reagent.Listener crashed. and i try to print the call stack when error happens and got this\r\n```\r\n{#Reference<.....>, :badarg}\r\n[{:erlang, :port_close, [#Port<0.140215>], []}, {:prim_inet, :close_port, 1, []}, {:inet, :close, 1, [file: 'inet.erl', line: 164]}, {Reagent.Listener, :handle_info, 2, [file: 'deps/reagent/lib/reagent/listener.ex', line: 216]}, {:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 616]}, {:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 686]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 247]}]\r\n```\r\ni don't know why, it is a port but badarg returns when to close it. and at first i try to use a Supervisor to start the Cauldron(yeah, actually  errors happened when i handle lots connections in Caruldron http server)\r\n```\r\n Supervisor.start_link(\r\n       [{Reagent.Listener, [\r\n           module: Cauldron,\r\n           env: [callback: Servlet],\r\n           options: [backlog: 1024, recv: [buffer: 16 * 1024]],\r\n           port: ***\r\n       ]}],\r\n       [strategy: :one_for_one, max_restarts: 100_000, max_seconds: 5]\r\n     )  \r\n```\r\nbut seems its not a good way,  doesn't fix the error and lots restart slow down the server response. so now i have to add a handle_info in Reagent.Listener, any way it works for me but  i really want to know how to fix that(or how to get the reason), thank you！\r\n"}}
{"actor":{"display_login":"zhangji00"}}