anchor.diff:      {A, C}.
   
   timeout_sink_loop(Action) ->
  +    timeout_sink_loop(Action, 100).
  +
  +timeout_sink_loop(Action, To) ->
       put(action,  nothing),
       put(sent,    0),
       put(elapsed, 0),
  -    timeout_sink_loop(Action, 0).
  -
  -timeout_sink_loop(Action, N) ->
  +    timeout_sink_loop(Action, To, 0).
  +
  +timeout_sink_loop(Action, To, N) ->
       put(action, send),
       Start   = erlang:monotonic_time(),
       Ret     = Action(),
  
positive.code:     ?P("done"),
      ok.
  
  send_timeout_basic(Config, BinData, SndBuf, AutoClose, RNode) ->
      ?P("[basic] sink"),
      {A, Pid}              = setup_timeout_sink(Config, RNode, 1000,
  					       AutoClose, SndBuf),
      Send                  = fun() -> gen_tcp:send(A, BinData) end,
      {{error, timeout}, _} = timeout_sink_loop(Send),
  
      %% Check that the socket is not busy/closed...
      ?P("verify socket not busy/closed"),
      case gen_tcp:send(A, <<"Hej">>) of
  	{error, Reason} ->
  	    ?P("(expected) send failure: ~p", [Reason]),
  	    after_send_timeout(AutoClose, Reason),
  	    (catch gen_tcp:close(A)),
  	    exit(Pid, kill),
  	    ok;
  	ok ->
  	    %% This is a bit wierd,
  	    %% we are supposed to verify that the socket is
  	    %% not busy/closed, and a successful send is
  	    %% exactly that, *not* busy or closed.
  	    %% But the test expects to return the errors
  	    %% 'timeout' or 'enotconn', so clearly we are
  	    %% testing something else...
  	    (catch gen_tcp:close(A)),
  	    exit(Pid, kill),
  	    ct:fail("Unexpected send success")
      end.
  
  send_timeout_para(Config, BinData, BufSz, AutoClose, RNode) ->
      ?P("[para] sink"),
      {A, Pid} = setup_timeout_sink(Config, RNode, 1000, AutoClose, BufSz),
      Self = self(),
      SenderFun = fun() ->
                          ?P("[para:sender] start"),
  
negative.code: 	    
  after_send_timeout(AutoClose, Reason) ->
      case Reason of
          timeout              when AutoClose =:= false -> ok;
          {timeout, _RestData} when AutoClose =:= false -> ok;
          enotconn             when AutoClose =:= true  -> ok;
  	closed               when AutoClose           -> ok;
          _ ->
              ?P("after_send_timeout -> "
                 "~n      AutoClose: ~w"
                 "~n      Reason:    ~p", [AutoClose, Reason]),
              exit({after_send_timeout, AutoClose, Reason})
      end.
  
  
  %% Test the send_timeout socket option for active sockets.
  send_timeout_active(Config) when is_list(Config) ->
      ?TC_TRY(send_timeout_active, fun() -> do_send_timeout_active(Config) end).
  
  do_send_timeout_active(Config) ->
      Dir = filename:dirname(code:which(?MODULE)),
      {ok, RNode} = ?START_SLAVE_NODE(?UNIQ_NODE_NAME, "-pa " ++ Dir),
      do_send_timeout_active(Config, false, RNode),
  