diff --git a/daphne/access.py b/daphne/access.py index e18138ad..2cd605dd 100644 --- a/daphne/access.py +++ b/daphne/access.py @@ -68,3 +68,4 @@ def write_entry( length or "-", ) ) + self.stream.flush() diff --git a/daphne/cli.py b/daphne/cli.py index a036821c..05fb48f9 100755 --- a/daphne/cli.py +++ b/daphne/cli.py @@ -224,7 +224,7 @@ def run(self, args): 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