anchor.diff:          undefined ->
               ok;
           Sock ->
  -            gen_tcp:close(Sock)
  +            Transport = State#state.transport,
  +            Transport:close(Sock)
       end,
   
       %% Decide whether to reconnect or exit
  
positive.code: 
  start_tls(State=#state{sock=Sock}) ->
      %% Send STARTTLS
      io:format("sending starttls~n"),
      StartTLSCode = riak_pb_codec:msg_code(rpbstarttls),
      gen_tcp:send(Sock, <<StartTLSCode:8>>),
      receive
  
negative.code:                     NewState = NewState0#state{active = NewActive}
              end
      end,
      case State#state.transport of
          gen_tcp ->
              ok = inet:setopts(Sock, [{active, once}]);
          ssl ->
              ok = ssl:setopts(Sock, [{active, once}])
      end,
      {noreply, NewState};
  handle_info({req_timeout, Ref}, State) ->
      case State#state.active of %%
  