     if Enum.empty?(state.receiver_queue) do
       case :inet.setopts(state.sock, active: false) do
         :ok -> :ok
-        error -> {:disconnect, error, {:error, :closed}, state}
+        error -> {:disconnect, error, error_response(state), state}
       end
     else
       :ok

        :ok = Receiver.read(s.receiver, from, command, opts)
        {:noreply, s}

      {:error, _reason} = error ->
        {:disconnect, error, error, s}
    end
  end


  end

  def handle_call({:execute_quiet, _commands}, _from, %State{sock: nil} = s) do
    {:reply, error_response(s), s}
  end

  def handle_call({:execute_quiet, commands}, from, s) do
