Browse files

Forgot JSONP for -1 messages

  • Loading branch information...
1 parent b1326e3 commit b124a03c8d70811d2bd2e5e0338619c5549a7257 @jalada committed Oct 21, 2010
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/hm_web.erl
View
8 src/hm_web.erl
@@ -258,8 +258,12 @@ feed(Response, Type, JSONP) ->
io:format("Stream process received unknown message: ~p~n", [Else])
after
?TIMEOUT ->
- %% Not fully implemented in JS
- Response:write_chunk(["-1,\"\""])
+ case JSONP of
+ undefined ->
+ Response:write_chunk(["-1,\"\""]);
+ _ ->
+ Response:write_chunk([JSONP, "(\"-1,\\\"\\\""])
+ end
end,
case Type of
{stream, _} ->

0 comments on commit b124a03

Please sign in to comment.