Fix: Resending message when the visibility of the browser page changes , which causes slowdown or failure to receive messages
This commit is contained in:
@@ -78,6 +78,7 @@ const fetchReply = async (message) => {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify(data),
|
||||
openWhenHidden: true,
|
||||
onopen(response) {
|
||||
if (response.ok && response.headers.get('content-type') === EventStreamContentType) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user