Skip to content

Commit

Permalink
Replace create_server by create_unix_server (#1362)
Browse files Browse the repository at this point in the history
* Replace create_server by create_unix_server

* Fix coverage
  • Loading branch information
Kludex authored Feb 4, 2022
1 parent 1c20f54 commit 632f33e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/coverage
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export SOURCE_FILES="uvicorn tests"

set -x

${PREFIX}coverage report --show-missing --skip-covered --fail-under=96.96
${PREFIX}coverage report --show-missing --skip-covered --fail-under=96.93
2 changes: 1 addition & 1 deletion uvicorn/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def _share_socket(sock: socket.SocketType) -> socket.SocketType:
uds_perms = 0o666
if os.path.exists(config.uds):
uds_perms = os.stat(config.uds).st_mode
server = await loop.create_server( # type: ignore[call-overload]
server = await loop.create_unix_server(
create_protocol, path=config.uds, ssl=config.ssl, backlog=config.backlog
)
os.chmod(config.uds, uds_perms)
Expand Down

0 comments on commit 632f33e

Please sign in to comment.