Skip to content

Commit

Permalink
feat: choose the candidate with minimum RTT
Browse files Browse the repository at this point in the history
  • Loading branch information
Celve committed Apr 1, 2024
1 parent 3dbf0ae commit c763e96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/aioice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .ice import Connection, ConnectionClosed, TransportPolicy

__all__ = ["Candidate", "Connection", "ConnectionClosed", "TransportPolicy"]
__version__ = "0.9.0.post0"
__version__ = "0.9.0.post1"

# Set default logging handler to avoid "No handler found" warnings.
logging.getLogger(__name__).addHandler(logging.NullHandler())
4 changes: 3 additions & 1 deletion src/aioice/ice.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,9 @@ def check_complete(self, pair: CandidatePair) -> None:

if pair.state == CandidatePair.State.SUCCEEDED:
if pair.nominated:
self._nominated[pair.component] = pair
# Always choose the one with minimum RTT
if pair.component not in self._nominated:
self._nominated[pair.component] = pair

# 8.1.2. Updating States
#
Expand Down

0 comments on commit c763e96

Please sign in to comment.