dannyball710
CDCloudflare Developers
•Created by dannyball710 on 6/23/2023 in #workers-help
WebSockets Hibernation API Delay in receiving messages
I'm trying out the WebSockets Hibernation API but I've run into a problem.
this is my program
https://github.com/dannyball710/WebSockets-Hibernation-API-Test
Create 2 websocket connections named
client_1
and client_2
(using Postman)
At the beginning, both the join message and the broadcast message are received normally.
I keep them connected for about 3 minutes.
Send a message through client_1
, client_2
receives it normally, but client_1
does not receive the broadcast message.
Send more messages through client_2
, but client_1
does not receive them.
Until about 90 seconds later client_1
receives all the missing messages at once.
It's different every time, but something like this always happens when you need to hold a connection and wait for a while.
I'm not sure if the way I wrote it is wrong or it's a problem with the cloudflare service1 replies