Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

websocket don't send msg after timeout in deno 1.32.4 #18715

Closed
anilkumarum opened this issue Apr 15, 2023 · 5 comments
Closed

websocket don't send msg after timeout in deno 1.32.4 #18715

anilkumarum opened this issue Apr 15, 2023 · 5 comments
Assignees
Labels
bug Something isn't working ext/websocket related to the ext/websocket crate

Comments

@anilkumarum
Copy link

anilkumarum commented Apr 15, 2023

Today, I upgrade deno to 1.32.4. Websocket break in deno 1.32.4.
First message successfully send but cannot send message after timeout.
It work fine in deno 1.32.3.

	const { socket, response } = Deno.upgradeWebSocket(reqEvent.request);
	socket.onopen = () => {
		console.log("socket opened");
		socket.send("Hello World!");
	};
	socket.onmessage = (e) => {
		socket.send("message from client received");//this work
		setTimeout(() => {
			socket.send("message send after some time");//this doesn't work
			// socket.close();
		}, 2000);
	};
	socket.onclose = () => console.log("WebSocket has been closed.");
	socket.onerror = (e) => console.error("WebSocket error:", e);
	reqEvent.respondWith(response);

please fix this issue.

@aapoalas
Copy link
Collaborator

It is likely that this is the same issue as #18700

If you can check the canary version (deno upgrade --canary) to see if the issue is already resolved, that'd be lovely.

@aapoalas aapoalas added bug Something isn't working ext/websocket related to the ext/websocket crate labels Apr 15, 2023
@pagoru
Copy link

pagoru commented Apr 15, 2023

Same problem with Windows 11, but not with macos.
Works fine with 1.32.3

@bartlomieju
Copy link
Member

@littledivy please take a look

@littledivy
Copy link
Member

This is fixed in canary. Try it out: deno upgrade --canary

@anilkumarum
Copy link
Author

okay, I wait for next stable update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ext/websocket related to the ext/websocket crate
Projects
None yet
Development

No branches or pull requests

5 participants