couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chewbra...@apache.org
Subject couch commit: updated refs/heads/2657-fix-cassim-fabric-calls-revised to 67584b9
Date Tue, 21 Apr 2015 18:11:09 GMT
Repository: couchdb-couch
Updated Branches:
  refs/heads/2657-fix-cassim-fabric-calls-revised [created] 67584b931


Fix error handling in couch_util:with_proc


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/67584b93
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/67584b93
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/67584b93

Branch: refs/heads/2657-fix-cassim-fabric-calls-revised
Commit: 67584b93195a8b6332bc4b2efa4b3ef19eccfa53
Parents: d4ae1a4
Author: Russell Branca <chewbranca@apache.org>
Authored: Tue Apr 21 18:10:44 2015 +0000
Committer: Russell Branca <chewbranca@apache.org>
Committed: Tue Apr 21 18:10:44 2015 +0000

----------------------------------------------------------------------
 src/couch_util.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/67584b93/src/couch_util.erl
----------------------------------------------------------------------
diff --git a/src/couch_util.erl b/src/couch_util.erl
index 69fd53f..742ab70 100644
--- a/src/couch_util.erl
+++ b/src/couch_util.erl
@@ -576,10 +576,10 @@ ensure_loaded(_Module) -> false.
 %% a function that does a receive as it would hijack incoming messages.
 with_proc(M, F, A, Timeout) ->
     {Pid, Ref} = spawn_monitor(fun() ->
-        exit(erlang:apply(M, F, A))
+        exit({reply, erlang:apply(M, F, A)})
     end),
     receive
-        {'DOWN', Ref, process, Pid, Resp} ->
+        {'DOWN', Ref, process, Pid, {reply, Resp}} ->
             {ok, Resp};
         {'DOWN', Ref, process, Pid, Error} ->
             {error, Error}


Mime
View raw message