Permalink
Browse files

fix: handle case where socket is none

  • Loading branch information...
nniclausse committed Jan 31, 2013
1 parent 544b2fe commit e17855253f37d73f012630f1a3690bc786029b78
Showing with 4 additions and 0 deletions.
  1. +1 −0 src/tsung/ts_tcp.erl
  2. +1 −0 src/tsung/ts_tcp6.erl
  3. +1 −0 src/tsung/ts_udp.erl
  4. +1 −0 src/tsung/ts_udp6.erl
View
@@ -53,6 +53,7 @@ close(Socket) ->
gen_tcp:close(Socket).
% set_opts/2 -> socket()
+set_opts(none, _Opts) -> none;
set_opts(Socket, Opts) ->
inet:setopts(Socket, Opts),
Socket.
View
@@ -46,6 +46,7 @@ close(Socket) ->
ts_tcp:close(Socket).
% set_opts/2 -> socket()
+set_opts(none, _Opts) -> none;
set_opts(Socket, Opts) ->
inet:setopts(Socket, Opts),
Socket.
View
@@ -52,6 +52,7 @@ close(Socket) ->
gen_udp:close(Socket).
% set_opts/2 -> socket()
+set_opts(none, _Opts) -> none;
set_opts(Socket, Opts) ->
inet:setopts(Socket, Opts),
Socket.
View
@@ -47,6 +47,7 @@ close(Socket) ->
ts_udp:close(Socket).
% set_opts/2 -> socket()
+set_opts(none, _Opts) -> none;
set_opts(Socket, Opts) ->
inet:setopts(Socket, Opts),
Socket.

0 comments on commit e178552

Please sign in to comment.