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',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
body: JSON.stringify(data),
|
body: JSON.stringify(data),
|
||||||
|
openWhenHidden: true,
|
||||||
onopen(response) {
|
onopen(response) {
|
||||||
if (response.ok && response.headers.get('content-type') === EventStreamContentType) {
|
if (response.ok && response.headers.get('content-type') === EventStreamContentType) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user