From 0562f28f6f33cb6381c1bd65489c6c351d4fdb28 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Sat, 23 Oct 2010 12:35:12 -0400 Subject: b25b5b was sloppy, erlang:send_after/3 does not wrap w/ ok --- apps/rexi/src/rexi_utils.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/rexi/src') diff --git a/apps/rexi/src/rexi_utils.erl b/apps/rexi/src/rexi_utils.erl index 1e8820e1..3b6102da 100644 --- a/apps/rexi/src/rexi_utils.erl +++ b/apps/rexi/src/rexi_utils.erl @@ -9,11 +9,11 @@ recv(Refs, Keypos, Fun, Acc0, infinity, PerMsgTO) -> process_mailbox(Refs, Keypos, Fun, Acc0, nil, PerMsgTO); recv(Refs, Keypos, Fun, Acc0, GlobalTimeout, PerMsgTO) -> TimeoutRef = erlang:make_ref(), - {ok, TRef} = erlang:send_after(GlobalTimeout, self(), {timeout, TimeoutRef}), + TRef = erlang:send_after(GlobalTimeout, self(), {timeout, TimeoutRef}), try process_mailbox(Refs, Keypos, Fun, Acc0, TimeoutRef, PerMsgTO) after - timer:cancel(TRef) + erlang:cancel_timer(TRef) end. process_mailbox(RefList, Keypos, Fun, Acc0, TimeoutRef, PerMsgTO) -> -- cgit v1.2.3