File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2433,7 +2433,8 @@ defmodule ExICE.Priv.ICEAgent do
24332433 # but it's return type is not standardized - sometimes it's %{states: [:closed]},
24342434 # some other time %{rstates: [:closed], wstates: [:closed]}.
24352435 case ice_agent . transport_module . sockname ( socket ) do
2436- { :error , :closed } -> ice_agent
2436+ # usually we'd see EINVAL here, but in rare cases it might be EBADF (FD already disposed of)
2437+ { :error , _reason } -> ice_agent
24372438 _ -> do_close_socket ( ice_agent , socket )
24382439 end
24392440 end
@@ -2522,7 +2523,6 @@ defmodule ExICE.Priv.ICEAgent do
25222523
25232524 defp do_restart ( ice_agent ) do
25242525 Enum . each ( ice_agent . sockets , fn socket ->
2525- IO . inspect ( socket , label: SOCK_IS )
25262526 case ice_agent . transport_module . sockname ( socket ) do
25272527 { :ok , { ip , port } } ->
25282528 # we could use close_socket function here but because we are
@@ -2531,7 +2531,7 @@ defmodule ExICE.Priv.ICEAgent do
25312531 :ok = ice_agent . transport_module . close ( socket )
25322532 :ok = flush_socket_msg ( socket )
25332533
2534- { :error , :closed } ->
2534+ { :error , _reason } ->
25352535 # socket already closed
25362536 :ok
25372537 end
You can’t perform that action at this time.
0 commit comments