uvicorn
uvicorn copied to clipboard
Add socket path to scope["server"]
I think we can refactor a bit what is here, but this should solve https://github.com/encode/uvicorn/discussions/2559.
I haven't tried it yet but those seem like the right changes, which are safe to do without much refactoring.
Only minor (subjective):
/tmpis global and it's better to use a unique prefix for files likeuvicorn-oruvicorn/, otherwise createtest.sockin the current directory - Edit: But that's okay, ifMockSocketthing doesn't create a real fileifrather thanelif.