Permalink
Browse files

Fix process crash for unsupported protocol

  • Loading branch information...
sthadka committed Nov 29, 2012
1 parent 5f277ed commit d2ae6a1ff400eb06d75ea6a7eff956810f7e524b
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/elli_request.erl
View
@@ -192,8 +192,10 @@ send_chunk(Ref, Data, Timeout) ->
{error, timeout}
end.
-is_ref_alive(Ref) ->
+is_ref_alive(Ref) when is_pid(Ref) ->
case node(Ref) =:= node() of
true -> is_process_alive(Ref);
false -> rpc:call(node(Ref), erlang, is_process_alive, [Ref])
- end.
+ end;
+is_ref_alive(_Ref) ->
+ false.

0 comments on commit d2ae6a1

Please sign in to comment.