Skip to content

Commit 0a99bdd

Browse files
VolsavrVolsavr
andauthored
set transport value using socket (#449)
Co-authored-by: Volsavr <[email protected]>
1 parent 27d491f commit 0a99bdd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/src/ua.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,8 +880,14 @@ class UA extends EventManager {
880880
// User no_answer_timeout.
881881
_configuration.no_answer_timeout *= 1000;
882882

883+
//Default transport initialization
883884
String transport = _configuration.transportType?.name ?? 'WS';
884885

886+
//Override transport from socket
887+
if(transport == 'WS' && _socketTransport != null){
888+
transport = _socketTransport!.via_transport;
889+
}
890+
885891
// Via Host.
886892
if (_configuration.contact_uri != null) {
887893
_configuration.via_host = _configuration.contact_uri.host;

0 commit comments

Comments
 (0)