Merge pull request #54 from indevgr/access-log-buffering

Access log buffering
This commit is contained in:
Andrew Godwin 2016-10-25 09:16:23 -07:00 committed by GitHub
commit 3c8c21b352
2 changed files with 2 additions and 2 deletions

View File

@ -126,7 +126,7 @@ class CommandLineInterface(object):
if args.access_log == "-":
access_log_stream = sys.stdout
else:
access_log_stream = open(args.access_log, "a")
access_log_stream = open(args.access_log, "a", 1)
elif args.verbosity >= 1:
access_log_stream = sys.stdout
# Import channel layer

View File

@ -314,7 +314,7 @@ class HTTPFactory(http.HTTPFactory):
"Got invalid WebSocket reply message on %s - "
"contains unknown keys %s (looking for either {'accept', 'text', 'bytes', 'close'})" % (
channel,
unknown_message_keys,
unknown_keys,
)
)
if message.get("accept", None) and protocol.state == protocol.STATE_CONNECTING: