Skip to content

Commit 9e40e78

Browse files
ElementalWarriora-feld
authored andcommitted
Fix asgi application behind nginx w/ unix socket
ASGIWebTransaction checks that the server key is available on the scope dict, however it expect it to be a tuple, it is possible that it is None.
1 parent e48d34e commit 9e40e78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

newrelic/api/asgi_application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def __init__(self, application, scope, receive, send):
225225
self.receive = receive
226226
self._send = send
227227
scheme = scope.get("scheme", "http")
228-
if "server" in scope:
228+
if "server" in scope and scope["server"] is not None:
229229
host, port = scope["server"] = tuple(scope["server"])
230230
else:
231231
host, port = None, None

0 commit comments

Comments
 (0)