Always ask for an SCTP m-section if datachannels have been used

This removes the behavior of not requesting datachannel if the first
datachannel is closed before the offer is created.

Bug: chromium:1423562
Change-Id: I90eab0f908507e65d9ee3dff51842ee6d61a8aa9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297860
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39570}
diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc
index ca234f7..a6272f5 100644
--- a/pc/peer_connection.cc
+++ b/pc/peer_connection.cc
@@ -1393,7 +1393,7 @@
   RTC_DCHECK_RUN_ON(signaling_thread());
   TRACE_EVENT0("webrtc", "PeerConnection::CreateDataChannel");
 
-  bool first_datachannel = !data_channel_controller_.HasDataChannels();
+  bool first_datachannel = !data_channel_controller_.HasUsedDataChannels();
 
   std::unique_ptr<InternalDataChannelInit> internal_config;
   if (config) {