     case Utils.connect(state) do
       {:ok, state} ->
         {:ok, timeout_store} = TimeoutStore.start_link()
-        state = %{state | timeout_store: timeout_store}
-        state = start_receiver_and_hand_socket(state)
+        receiver = start_receiver_and_hand_socket(state.socket, timeout_store)
+        state = %{state | timeout_store: timeout_store, receiver: receiver}
         {:ok, state}
       {:error, reason} ->
         Logger.error [

  end

  def disconnect({:error, reason} = _error, state) do
    Logger.error ["Disconnected from Redis (#{Utils.format_host(state)}): ",
                  Utils.format_error(reason)]

    # When we're here, the receiver already exited with :normal by itself, but
    # we manually have to kill the TimeoutStore.
    :ok = TimeoutStore.stop(state.timeout_store)

    {:backoff, @initial_backoff, %{state | socket: nil, current_backoff: @initial_backoff}}
  end

  @doc false

  defp sync_connect(state) do
    case Utils.connect(state) do
      {:ok, state} ->
        {:ok, timeout_store} = TimeoutStore.start_link()
        receiver = start_receiver_and_hand_socket(state.socket, timeout_store)
        state = %{state | timeout_store: timeout_store, receiver: receiver}
        {:ok, state}
      {:error, reason} ->
        {:stop, reason}
