anchor.diff:            "state=disconnecting", log_info(S, [])),
       {next_state, disconnected, tcp_bad(S#state{send_tref=undefined}), hibernate};
   disconnecting({inet_reply, Sock, Status}, S = #state{sock = Sock,
  -                                                     idle_tref = IdleTRef,
                                                        send_tref = SendTRef}) ->
       case Status of
           {error, Reason} ->
  
positive.code:                 reconnect_tref = undefined :: 'undefined' | reference(),
                  %% Send timer reference
                  send_tref = undefined :: 'undefined' | reference(),
                  %% Idle timer reference
                  idle_tref = undefined :: 'undefined' | reference(),
                  %% Time of last successful connection
                  connect_time :: 'undefined' | erlang:timestamp()
                 }).
  
negative.code:          "err=gen_tcp data=~p sock=~p duration=~s state=sending",
            log_info(S, [sending, Reason, Sock, duration(S)])),
      reconnect(tcp_bad(S));
  sending({timeout, _, ?IDLE_TIMEOUT_MSG}, State) ->
      case close_if_idle(State) of
          closed ->
              {next_state, disconnecting, State#state{sock = undefined}};
          ok ->
              {next_state, sending, State}
      end;
  sending(timeout, S = #state{}) ->
      %% Sleep when inactive, trigger fullsweep GC & Compact
      {next_state, sending, S, hibernate};
  