File tree Expand file tree Collapse file tree 1 file changed +5
-19
lines changed
src/NetworkTest/testQuality/helpers Expand file tree Collapse file tree 1 file changed +5
-19
lines changed Original file line number Diff line number Diff line change @@ -77,32 +77,18 @@ const determineRoutingResolution = (
7777 return 'Routed' ;
7878 }
7979
80- if ( remoteType === 'relay' ) {
81- if ( protocol === 'tcp' ) {
82- return 'Relayed (TURN/TLS)' ;
83- }
84- return 'Relayed (TURN/UDP)' ;
85- }
80+ const isTcp = protocol === 'tcp' ;
8681
87- if ( localType === 'relay' ) {
88- if ( protocol === 'tcp' ) {
89- return 'Relayed (TURN/TLS)' ;
90- }
91- return 'Relayed (TURN/UDP)' ;
82+ if ( localType === 'relay' || remoteType === 'relay' ) {
83+ return isTcp ? 'Relayed (TURN/TLS)' : 'Relayed (TURN/UDP)' ;
9284 }
9385
9486 if ( localType === 'srflx' || remoteType === 'srflx' ) {
95- if ( protocol === 'tcp' ) {
96- return 'Relayed (STUN/TLS)' ;
97- }
98- return 'Relayed (STUN/UDP)' ;
87+ return isTcp ? 'Relayed (STUN/TLS)' : 'Relayed (STUN/UDP)' ;
9988 }
10089
10190 if ( localType === 'prflx' || remoteType === 'prflx' ) {
102- if ( protocol === 'tcp' ) {
103- return 'Relayed (STUN/TLS)' ;
104- }
105- return 'Relayed (STUN/UDP)' ;
91+ return isTcp ? 'Relayed (STUN/TLS)' : 'Relayed (STUN/UDP)' ;
10692 }
10793 return 'Unknown' ;
10894} ;
You can’t perform that action at this time.
0 commit comments