Skip to content

Commit 7c93b4b

Browse files
Fixed bug on Python 3.4 where unpacking 2 lists in argument doesn't
work. Turns out unpacking multiple lists in a function's argument is new in Python 3.5 (PEP 448).
1 parent 1cdcb1a commit 7c93b4b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ptadapter/relays.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ def close(self):
122122
wait_list.append(self._server)
123123
for conn in self._connections:
124124
conn.cancel()
125-
yield from asyncio.gather(*wait_list, *self._connections,
126-
return_exceptions=True)
125+
wait_list.extend(self._connections)
126+
yield from asyncio.gather(*wait_list, return_exceptions=True)
127127

128128

129129
class ProxyNegotiator():
@@ -327,4 +327,4 @@ def _negotiate_proxy(self, sreader, swriter):
327327
else:
328328
raise ProxyNegotiationError(
329329
'Malformed SOCKS5 reply {!r}'.format(buf))
330-
self._logger.debug('SOCKS5 negotiation complete')
330+
self._logger.debug('SOCKS5 negotiation complete')

0 commit comments

Comments
 (0)