- 
                Notifications
    
You must be signed in to change notification settings  - Fork 3.4k
 
Open
Description
Note
This issue was unearthed by us due to what seems an issue on our side. My colleague @Faless explains it on the Godot Dev Chat. Though, the issue underlined is still a logic flaw.
Regression introduced by #22630
emscripten/src/library_sockfs.js
Lines 632 to 647 in 06cebfc
| // if we don't have a cached connectionless UDP datagram connection, or | |
| // the TCP socket is still connecting, queue the message to be sent upon | |
| // connect, and lie, saying the data was sent now. | |
| if (!dest || dest.socket.readyState !== dest.socket.OPEN) { | |
| // if we're not connected, open a new connection | |
| if (sock.type === {{{ cDefs.SOCK_DGRAM }}}) { | |
| if (!dest || dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) { | |
| dest = SOCKFS.websocket_sock_ops.createPeer(sock, addr, port); | |
| } | |
| } | |
| #if SOCKET_DEBUG | |
| dbg(`websocket: queuing (${length} bytes): ${new Uint8Array(data)}`); | |
| #endif | |
| dest.msg_send_queue.push(data); | |
| return length; | |
| } | 
If dest == null and sock.type !== {{{ cDefs.SOCK_DGRAM }}} (see code above), then the following error occurs:

Metadata
Metadata
Assignees
Labels
No labels