Skip to content

Commit ddef048

Browse files
committed
0.7 compat
1 parent b768607 commit ddef048

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/protocol.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,12 @@ function _wait_resp(sendmethod, chan::MessageChannel, default_result::T,
628628
if !nowait
629629
reply = Channel{T}(1)
630630
# timer to time the request out, in case of an error
631-
t = Timer((t)->try put!(reply, timeout_result) end, timeout)
631+
t = Timer(timeout) do t
632+
try
633+
put!(reply, timeout_result)
634+
catch
635+
end
636+
end
632637
# register a callback
633638
handle(chan, resp_class, resp_meth, resp_handler, reply)
634639
end

0 commit comments

Comments
 (0)