bobbyd
bobbyd
DDeno
Created by bobbyd on 11/23/2024 in #help
Deno2: Websocket send not flushed until another message is received
I'm seeing behavior similar to this in Deno 2.1.1 https://github.com/denoland/deno/issues/18700 As far as I know I'm doing nothing special at all, just using the standard Deno websockets. I don't see any way to flush them based on the current implementation, and this bug suggests it was fixed. Here's my code for creating the websocket:

const { socket, response } = Deno.upgradeWebSocket(request);
socket.addEventListener("open", () => {
console.log("New peer websocket connection");
});
socket.addEventListener("message", (event) => {
}

const { socket, response } = Deno.upgradeWebSocket(request);
socket.addEventListener("open", () => {
console.log("New peer websocket connection");
});
socket.addEventListener("message", (event) => {
}
Is there any way to flush the websocket connection in Deno 2?
1 replies