Elyo
Elyo
CDCloudflare Developers
Created by Elyo on 7/28/2024 in #durable-objects
Build a WebSocket server with WebSocket ...
And I really need to use DO
18 replies
CDCloudflare Developers
Created by Elyo on 7/28/2024 in #durable-objects
Build a WebSocket server with WebSocket ...
Thanks @milan I will submit an issue, I am really stuck on something simple, don't know what is the reason so far
18 replies
CDCloudflare Developers
Created by Elyo on 7/28/2024 in #durable-objects
Build a WebSocket server with WebSocket ...
I have a webSocketClose()
async webSocketClose(ws, code, reason, wasClean) {
console.log("Websocket closed", code, reason, wasClean);
ws.close(code, "Durable Object is closing WebSocket");
}
async webSocketClose(ws, code, reason, wasClean) {
console.log("Websocket closed", code, reason, wasClean);
ws.close(code, "Durable Object is closing WebSocket");
}
If I cut the socket abruptly, in my localhost I am getting a response
Websocket closed 1006 WebSocket disconnected without sending Close frame. false
[ERROR] Uncaught (in response) Error: The script will never generate a response.
Websocket closed 1006 WebSocket disconnected without sending Close frame. false
[ERROR] Uncaught (in response) Error: The script will never generate a response.
Only the webSocketMessage is unresponsive. The issue is only from me? I can't believe it, I am just following the example from the docs.. I want to use the websocket to provide a listing to my users, but I should use another service or do it differently? a bit loosing faith because there are no much different things to try, the code is not long and look simple. Is there a bug on DO side?
18 replies