From b9ca006c38a6a9f01c0eacc1e66a2743424ed389 Mon Sep 17 00:00:00 2001 From: Volsavr Date: Tue, 2 Jul 2024 14:52:42 +0300 Subject: [PATCH] set transport value using socket --- 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;