Skip to content

Commit

Permalink
set transport value using socket (#449)
Browse files Browse the repository at this point in the history
Co-authored-by: Volsavr <[email protected]>
  • Loading branch information
Volsavr and Volsavr authored Jul 24, 2024
1 parent 27d491f commit 0a99bdd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/src/ua.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0a99bdd

Please sign in to comment.