mirror of
https://github.com/django/daphne.git
synced 2025-04-21 01:02:06 +03:00
Found a bug whereby streaming responses would try to be cached (#396)
entirely in memory. Was causing views that stream a lot of data to timeout.
This commit is contained in:
parent
c419d01ded
commit
1673be5b75
|
@ -340,7 +340,9 @@ class ViewConsumer(object):
|
|||
# a whole worker if the client just vanishes and leaves the response
|
||||
# channel full.
|
||||
try:
|
||||
message.reply_channel.send(reply_message)
|
||||
# Note: Use immediately to prevent streaming responses trying
|
||||
# cache all data.
|
||||
message.reply_channel.send(reply_message, immediately=True)
|
||||
except message.channel_layer.ChannelFull:
|
||||
time.sleep(0.05)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user