tres/secure_channel: Fix to avoid crash when receive malformed packet

This commit is contained in:
Eishun Kondoh 2018-05-02 15:39:58 +09:00
parent bc3c65cfa9
commit 6bba512271
5 changed files with 66 additions and 29 deletions

View file

@ -35,7 +35,7 @@ defmodule Tres.SwitchRegistry do
def blocking_send_message(message, {_dpid, _aux_id} = datapath_id) do
[{pid, _} | _] = Registry.lookup(__MODULE__, datapath_id)
:gen_statem.call(pid, {:send_message, message}, 500)
:gen_statem.call(pid, {:send_message, message}, 5000)
catch
:exit, {:timeout, _} ->
{:error, :timeout}