Skip to content

Commit

Permalink
Fix for issue #40
Browse files Browse the repository at this point in the history
  • Loading branch information
omarkj committed May 27, 2011
1 parent 1f0096f commit eca9cb8
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/socketio_transport_xhr_multipart.erl
Expand Up @@ -57,19 +57,19 @@ init([Sup, SessionId, ServerModule, {'xhr-multipart', {Req, Caller}}]) ->
apply(ServerModule, ensure_longpolling_request, [Req]),
process_flag(trap_exit, true),
HeartbeatInterval =
case application:get_env(heartbeat_interval) of
{ok, Time} ->
Time;
_ ->
infinity
end,
case application:get_env(heartbeat_interval) of
{ok, Time} ->
Time;
_ ->
infinity
end,
CloseTimeout =
case application:get_env(close_timeout) of
{ok, Time0} ->
Time0;
_ ->
8000
end,
case application:get_env(close_timeout) of
{ok, Time0} ->
Time0;
_ ->
8000
end,
{ok, EventMgr} = gen_event:start_link(),
gen_server:cast(self(), {initialize, Req}),
socketio_client:send(self(), #msg{ content = SessionId }),
Expand Down Expand Up @@ -195,7 +195,7 @@ handle_info({'EXIT',_Port,_Reason}, #state{ close_timeout = ServerTimeout} = Sta
{noreply, State#state { connection_reference = {'xhr-multipart', none}}, ServerTimeout};

handle_info(timeout, #state{ server_module = ServerModule,
connection_reference = {'xhr-multipart', none, req = Req}, caller = Caller } = State) ->
connection_reference = {'xhr-multipart', none}, req = Req, caller = Caller } = State) ->
gen_server:reply(Caller, apply(ServerModule, respond, [Req, 200, ""])),
{stop, shutdown, State};

Expand Down

2 comments on commit eca9cb8

@jannschu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you

@omarkj
Copy link
Collaborator Author

@omarkj omarkj commented on eca9cb8 May 27, 2011 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.