Skip to content

Commit

Permalink
set transport value using socket
Browse files Browse the repository at this point in the history
  • Loading branch information
Volsavr committed Jul 2, 2024
1 parent 11b02e6 commit b9ca006
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 b9ca006

Please sign in to comment.