Remove unused select_protocol_or_fail

This commit is contained in:
NIC619 2019-09-14 17:42:18 +08:00
parent 811cd7813a
commit 65a48d5c51
No known key found for this signature in database
GPG Key ID: 570C35F5C2D51B17

View File

@ -38,24 +38,6 @@ class MultiselectClient(IMultiselectClient):
# Handshake succeeded if this point is reached # Handshake succeeded if this point is reached
async def select_protocol_or_fail(
self, protocol: TProtocol, communicator: IMultiselectCommunicator
) -> TProtocol:
"""
Send message to multiselect selecting protocol
and fail if multiselect does not return same protocol
:param protocol: protocol to select
:param stream: stream to communicate with multiselect over
:return: selected protocol
"""
# Perform handshake to ensure multiselect protocol IDs match
await self.handshake(communicator)
# Try to select the given protocol
selected_protocol = await self.try_select(communicator, protocol)
return selected_protocol
async def select_one_of( async def select_one_of(
self, protocols: Sequence[TProtocol], communicator: IMultiselectCommunicator self, protocols: Sequence[TProtocol], communicator: IMultiselectCommunicator
) -> TProtocol: ) -> TProtocol: