mirror of
https://github.com/django/daphne.git
synced 2024-11-22 07:56:34 +03:00
Add in HTTP/2 support with right deps and log info
This commit is contained in:
parent
e6e4240c0e
commit
a925ce32cd
|
@ -4,6 +4,7 @@ import warnings
|
|||
from twisted.internet import reactor, defer
|
||||
from twisted.internet.endpoints import serverFromString
|
||||
from twisted.logger import globalLogBeginner, STDLibLogObserver
|
||||
from twisted.web import http
|
||||
|
||||
from .http_protocol import HTTPFactory
|
||||
|
||||
|
@ -84,6 +85,12 @@ class Server(object):
|
|||
else:
|
||||
globalLogBeginner.beginLoggingTo([STDLibLogObserver(__name__)])
|
||||
|
||||
# Detect what Twisted features are enabled
|
||||
if http.H2_ENABLED:
|
||||
logger.info("HTTP/2 support enabled")
|
||||
else:
|
||||
logger.info("HTTP/2 support not enabled (install the http2 and tls Twisted extras)")
|
||||
|
||||
# Disabled deliberately for the moment as it's worse performing
|
||||
if "twisted" in self.channel_layer.extensions and False:
|
||||
logger.info("Using native Twisted mode on channel layer")
|
||||
|
|
Loading…
Reference in New Issue
Block a user