File tree Expand file tree Collapse file tree 4 files changed +7
-6
lines changed
Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -361,7 +361,7 @@ def new_host(
361361 network = swarm ,
362362 enable_mDNS = enable_mDNS ,
363363 bootstrap = bootstrap ,
364- negotitate_timeout = negotiate_timeout
364+ negotiate_timeout = negotiate_timeout
365365 )
366366
367367
Original file line number Diff line number Diff line change @@ -96,12 +96,12 @@ def __init__(
9696 enable_mDNS : bool = False ,
9797 bootstrap : list [str ] | None = None ,
9898 default_protocols : Optional ["OrderedDict[TProtocol, StreamHandlerFn]" ] = None ,
99- negotitate_timeout : int = DEFAULT_NEGOTIATE_TIMEOUT ,
99+ negotiate_timeout : int = DEFAULT_NEGOTIATE_TIMEOUT ,
100100 ) -> None :
101101 self ._network = network
102102 self ._network .set_stream_handler (self ._swarm_stream_handler )
103103 self .peerstore = self ._network .peerstore
104- self .negotiate_timeout = negotitate_timeout
104+ self .negotiate_timeout = negotiate_timeout
105105 # Protocol muxing
106106 default_protocols = default_protocols or get_default_protocols (self )
107107 self .multiselect = Multiselect (dict (default_protocols .items ()))
Original file line number Diff line number Diff line change @@ -54,21 +54,21 @@ async def select_one_of(
5454 self ,
5555 protocols : Sequence [TProtocol ],
5656 communicator : IMultiselectCommunicator ,
57- negotitate_timeout : int = DEFAULT_NEGOTIATE_TIMEOUT ,
57+ negotiate_timeout : int = DEFAULT_NEGOTIATE_TIMEOUT ,
5858 ) -> TProtocol :
5959 """
6060 For each protocol, send message to multiselect selecting protocol and
6161 fail if multiselect does not return same protocol. Returns first
6262 protocol that multiselect agrees on (i.e. that multiselect selects)
6363
64- :param protocol: protocol to select
64+ :param protocols: protocols to select from
6565 :param communicator: communicator to use to communicate with counterparty
6666 :param negotiate_timeout: timeout for negotiation
6767 :return: selected protocol
6868 :raise MultiselectClientError: raised when protocol negotiation failed
6969 """
7070 try :
71- with trio .fail_after (negotitate_timeout ):
71+ with trio .fail_after (negotiate_timeout ):
7272 await self .handshake (communicator )
7373
7474 for protocol in protocols :
Original file line number Diff line number Diff line change 1+ Fixed a typo in the ``negotiate_timeout `` parameter name.
You can’t perform that action at this time.
0 commit comments