anchor.diff:    when is_port(Sock) ->
       %% Stale message.
       send(State);
  -ready_to_send({timeout, _Ref, ?IDLE_TIMEOUT_MSG}, S) ->
  +ready_to_send({timeout, TRef, ?IDLE_TIMEOUT_MSG}, S=#state{idle_tref=TRef}) ->
       case close_if_idle(S) of
           {closed, ClosedState} ->
               {next_state, disconnected, ClosedState, hibernate};
  
positive.code:     {next_state, disconnected, NewState, hibernate};
  disconnecting({post, Msg}, State) ->
      {next_state, sending, buffer(Msg, State), ?HIBERNATE_TIMEOUT};
  disconnecting({timeout, _, ?IDLE_TIMEOUT_MSG}, State) ->
      %% Shouldn't see this since entering this state means the timer wasn't reset
      ?WARN("drain_id=~p channel_id=~p dest=~s err=unexpected_idle_timeout "
            "data=~p state=disconnecting", log_info(State, [])),
  
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, TRef, ?IDLE_TIMEOUT_MSG}, State=#state{idle_tref=TRef}) ->
      case close_if_idle(State) of
          {closed, ClosedState} ->
              {next_state, disconnecting, ClosedState};
  