From 840ddaa4b307b5e57c55f588e62fea0d91d43d5b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Sat, 3 Aug 2019 22:11:13 -0400
Subject: [PATCH] ice transport: ignore EPENDING in UDP

Change-Id: Id74b251686266dbe2a75ad01e1b58ba0a4b4501d
---
 src/ice_transport.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ice_transport.cpp b/src/ice_transport.cpp
index 2614e355ee..3ec8061e4a 100644
--- a/src/ice_transport.cpp
+++ b/src/ice_transport.cpp
@@ -1230,7 +1230,7 @@ IceTransport::send(int comp_id, const unsigned char* buf, size_t len)
     }
     pj_ssize_t sent_size = 0;
     auto status = pj_ice_strans_sendto2(pimpl_->icest_.get(), comp_id+1, buf, len, remote.pjPtr(), remote.getLength(), &sent_size);
-    if (status == PJ_EPENDING) {
+    if (status == PJ_EPENDING && isTCPEnabled()) {
         auto current_size = sent_size;
         // NOTE; because we are in TCP, the sent size will count the header (2
         // bytes length).
-- 
GitLab