From 0a99bddf39a37a67eb681405023a3d357d80c90a Mon Sep 17 00:00:00 2001 From: Volsavr Date: Wed, 24 Jul 2024 04:36:01 +0300 Subject: [PATCH] set transport value using socket (#449) Co-authored-by: Volsavr --- lib/src/ua.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/src/ua.dart b/lib/src/ua.dart index 36eddc94..67d65a48 100644 --- a/lib/src/ua.dart +++ b/lib/src/ua.dart @@ -880,8 +880,14 @@ class UA extends EventManager { // User no_answer_timeout. _configuration.no_answer_timeout *= 1000; + //Default transport initialization String transport = _configuration.transportType?.name ?? 'WS'; + //Override transport from socket + if(transport == 'WS' && _socketTransport != null){ + transport = _socketTransport!.via_transport; + } + // Via Host. if (_configuration.contact_uri != null) { _configuration.via_host = _configuration.contact_uri.host;