anchor.diff:                    "state=disconnected at=connect try=~p sock=~p",
                     log_info(State, [Failures + 1, Sock])),
               NewBuf = case logplex_msg_buffer:len(Buf) =:= ?SHRINK_BUF_SIZE of
  -                        true -> logplex_msg_buffer:resize(?DEFAULT_BUF_SIZE, Buf);
  +                        true -> logplex_msg_buffer:resize(default_buf_size(), Buf);
                           false -> Buf
                       end,
               NewState = State#state{sock=Sock,
  
positive.code:                 false ->
                      Buf
              end;
          false ->
              Buf
      end,
      %% We hibernate only when we need to reconnect with a timer. The timer
  
negative.code:                 port :: inet:port_number(),
                  sock = undefined :: 'undefined' | inet:socket(),
                  %% Buffer for messages while disconnected
                  buf = logplex_msg_buffer:new(default_buf_size()) :: logplex_msg_buffer:buf(),
                  %% Last time we connected or successfully sent data
                  last_good_time :: 'undefined' | erlang:timestamp(),
                  %% TCP failures since last_good_time
  