[erlang-questions] misultin: handle disconnect
Sat Oct 9 18:31:54 CEST 2010
try to use the code in the /examples directory instead, since the one
you are providing here is a specific user case, not recommended unless
you know exactly what you are doing.
that being said, misultin is not built to empower a comet application.
it does not provide events, like sockets being closed, to the http
handle_loop. instead of comet, it has been preferred to support
websockets, something misultin is quite good at.
if you need comet instead, you will be better off using misultin core
and build your own comet application over that.
2010/10/9 Garanin Michael <>:
> I try use misultin as comet-server.
> I copy code from post
> and simple adapted for keep request 10 minutes.
> I need handle disconnect (for example client close browser). I try use
> "link" but "handle_http" not died after client disconnect.
> Q: how i can handle disconnect ?
> /and sorry my bad english/
> handle_http(Req) -> % spawn external process
> Pid = spawn(?MODULE, external_proc, [self()]),
> % send req
> Pid ! Req,
> % wait
> Response -> Response
> external_proc(ControllerPid) ->
> .. after 10 minutes ....
> ControllerPid ! Req:ok("OK").
More information about the erlang-questions