Closed brandonkal closed 4 years ago
Let me know about your environment. Deno version, OS, using commands, etc.
@ryo-ma It was the k3s service-lb. It appears kubernetes is not notifying the underlying host (ubuntu bionic) that it is using a port (8080 in this case). So Deno was happy to bind to that port.
I'm not sure if there is any way to fix that. So the second error above is fine (it's unexpected).
I'm going to leave this open though because the program shouldn't be throwing a TypeError. The issue is that https://github.com/ryo-ma/deno-websocket/blob/master/lib/websocket.ts#L53 is async. The code needs to wait for that to resolve before it accepts messages.
Thank you for your reply. OK. I think too the program shouldn't be throwing a TypeError. I will be throwing the other error when never finished initializing the connection.
I have fixed the error type and error message. https://github.com/ryo-ma/deno-websocket/blob/10a1954ac81c3d09f4bb2269c1b03edf500c5c09/lib/websocket.ts#L114
Removing the send line: