Changes between Initial Version and Version 1 of Ticket #17714, comment 1
- Timestamp:
- Apr 23, 2022, 1:13:33 AM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #17714, comment 1
initial v1 1 The problem seems to be that [https://git.haiku-os.org/haiku/tree/src/add-ons/kernel/network/stack/net_socket.cpp#n918 socket_request_notification] sends a notification when socket_send_avail() < B_OK, but [https://git.haiku-os.org/haiku/tree/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp#n904 TCPEndpoint::SendAvailable] (which eventually gets called for socket_send_avail for TCP sockets) returns EPIPE (which is < B_OK) for cases in which the socket is not writable. The impression I get is that it meant to check for > B_OK since the same TCP method returns the (positive) free buffer size for a writable socket, for example. Flipping the check does indeed solve the issue, if this seems reasonable I'd like to submit a patch .1 The problem seems to be that [https://git.haiku-os.org/haiku/tree/src/add-ons/kernel/network/stack/net_socket.cpp#n918 socket_request_notification] sends a notification when socket_send_avail() < B_OK, but [https://git.haiku-os.org/haiku/tree/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp#n904 TCPEndpoint::SendAvailable] (which eventually gets called for socket_send_avail for TCP sockets) returns EPIPE (which is < B_OK) for cases in which the socket is not writable. The impression I get is that it meant to check for > B_OK since the same TCP method returns the (positive) free buffer size for a writable socket, for example. Flipping the check does indeed solve the issue, if this seems reasonable I'd like to submit a patch myself.