We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1759a42 commit 99d1d6cCopy full SHA for 99d1d6c
serial_asyncio_fast/__init__.py
@@ -512,11 +512,15 @@ async def create_serial_connection(
512
Any additional arguments will be forwarded to the Serial constructor.
513
"""
514
parsed_url = urllib.parse.urlparse(url)
515
+ is_socket = parsed_url.scheme == "socket"
516
+
517
+ if is_socket and "do_not_open" not in kwargs:
518
+ kwargs["do_not_open"] = True
519
520
callback = partial(serial.serial_for_url, url, *args, **kwargs)
521
serial_instance = await loop.run_in_executor(None, callback)
522
- if parsed_url.scheme == "socket":
523
+ if is_socket:
524
transport, protocol = await loop.create_connection(
525
protocol_factory, parsed_url.hostname, parsed_url.port
526
)
0 commit comments