emscripten-core / emscripten-core/emscripten

Return code from sendto, etc handled incorrectly in websocket_to_posix_proxy

Open
#16,897 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

The return code from sendto() and recvfrom() is the number of bytes sent or -1 for an error so the check for an error here should be ret<0, not ret!=0
https://github.com/emscripten-core/emscripten/blob/8373cfa4d4a83f7840a46a4de81cc58ca8a9ea5e/tools/websocket_to_posix_proxy/src/websocket_to_posix_proxy.c#L1217
https://github.com/emscripten-core/emscripten/blob/8373cfa4d4a83f7840a46a4de81cc58ca8a9ea5e/tools/websocket_to_posix_proxy/src/websocket_to_posix_proxy.c#L1259

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.