Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Keep VM network socket on EAGAIN

If the Unix socket returns EAGAIN, do not remove the socket from the
list of active VM's.
  • Loading branch information...
commit 1e34627710e83a79043151715d24ad0b7206c754 1 parent 46bf2b8
@msantos authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/evum_switch.erl
View
8 src/evum_switch.erl
@@ -141,7 +141,13 @@ handle_call(name, _From, #state{sun = Sun} = State) ->
%% addresses.
handle_call({net, Data}, _From, #state{s = Socket, addr = Addr} = State) ->
Addr1 = ordsets:filter(
- fun(Sun) -> ok == procket:sendto(Socket, Data, 0, Sun) end,
+ fun(Sun) ->
+ case procket:sendto(Socket, Data, 0, Sun) of
+ ok -> true;
+ {error,eagain} -> true;
+ _ -> false
+ end
+ end,
Addr
),
{reply, ok, State#state{addr = Addr1}};
Please sign in to comment.
Something went wrong with that request. Please try again.