Skip to content
Browse files

Fix process crash for unsupported protocol

  • Loading branch information...
1 parent 5f277ed commit d2ae6a1ff400eb06d75ea6a7eff956810f7e524b @sthadka sthadka committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/elli_request.erl
View
6 src/elli_request.erl
@@ -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.
Something went wrong with that request. Please try again.