summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul J. Davis <paul.joseph.davis@gmail.com>2013-09-06 15:04:00 -0500
committerRobert Newson <rnewson@apache.org>2014-07-23 17:58:14 +0100
commit945bfcac25007518f39cfbc6eb61d6d67773f598 (patch)
tree1fe535ba44542eedafa976ee5b15485c304bea77
parent8f2c2956a80afce73e4193819bf6c973376a28cd (diff)
downloadcouchdb-945bfcac25007518f39cfbc6eb61d6d67773f598.tar.gz
Exit with timeout instead of returning an atom
Every function that called `rexi:stream/1` had to check the return value for timeout and would then call `erlang:exit/1` if that atom were returned. Rather than force every function to make this check this just calls exit in `rexi:stream/1`. Its possible to catch this if a process ever happens to require it. BugzId: 22729
-rw-r--r--src/rexi.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rexi.erl b/src/rexi.erl
index 75bc9bf8a..20f582bd3 100644
--- a/src/rexi.erl
+++ b/src/rexi.erl
@@ -181,7 +181,7 @@ stream(Msg, Limit, Timeout) ->
erlang:send(Caller, {rexi, Ref, self(), Msg}),
ok
catch throw:timeout ->
- timeout
+ exit(timeout)
end.
%% @equiv stream_ack(Client, 1)