anchor.diff:                       CSock;
               {error, eaddrnotavail = Reason} ->
                   skip(connect_failed_str(Reason))
  -        end,            
  +        end,
       {ok, S} = gen_tcp:accept(L),
       ok = gen_tcp:close(L),
       ok = inet:setopts(S, [{linger, {true, 0}}]),
  
positive.code:     ok = gen_tcp:send(Client1, Payload),
      ok = gen_tcp:close(S1),
      ok = ct:sleep(20),
      {error, econnreset} = gen_tcp:recv(Client1, 0).
  
  %%
  %% Test {linger {true, 0}} aborts a connection
  
negative.code:     end.
  
  econnreset_after_async_send_passive(Config) when is_list(Config) ->
      try do_econnreset_after_async_send_passive(Config)
      catch
          throw:{skip, _} = SKIP ->
              SKIP
      end.
  
  do_econnreset_after_async_send_passive(_Config) ->
      {OS, _} = os:type(),
      Payload = lists:duplicate(1024 * 1024, $.),
  
      %% First confirm everything works with option turned off.
      p("test with option switched off (default)"),
      {ok, L} = gen_tcp:listen(0, [{active, false}, {recbuf, 4096}]),
      {ok, Port} = inet:port(L),
      Client = case gen_tcp:connect(localhost, Port,
                                    [{active, false}, {sndbuf, 4096}]) of
                   {ok, CSock} ->
                       CSock;
              {error, eaddrnotavail = Reason} ->
                  skip(connect_failed_str(Reason))
          end,
      {ok, S} = gen_tcp:accept(L),
      ok = gen_tcp:close(L),
      ok = inet:setopts(S, [{linger, {true, 0}}]),
  