diff --git a/daphne/access.py b/daphne/access.py index e18138a..2cd605d 100644 --- a/daphne/access.py +++ b/daphne/access.py @@ -68,3 +68,4 @@ class AccessLogGenerator: length or "-", ) ) + self.stream.flush() diff --git a/daphne/cli.py b/daphne/cli.py index a036821..05fb48f 100755 --- a/daphne/cli.py +++ b/daphne/cli.py @@ -224,7 +224,7 @@ class CommandLineInterface: if args.access_log == "-": access_log_stream = sys.stdout else: - access_log_stream = open(args.access_log, "a", 1) + access_log_stream = open(args.access_log, "a") elif args.verbosity >= 1: access_log_stream = sys.stdout