Skip to content
Snippets Groups Projects
Commit 3389aadc authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Revert "Check socket writability in JS Socket.send()"

This reverts commit f0127e9d.

This change was "wrong-headed" per Deuce and broke JS sends on
blocking sockets. Thanks for the help.

This fix for inifinite-wait on send() likely led to the infinite
BinkIT errors/log messages that led to commit 4dd32231.

The real fix for this problem (which can block all other timed
events from running), would be a Socket.poll() on the socket before
send in binkp.js.
parent 45a25fbb
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3404 passed
...@@ -337,12 +337,8 @@ static ptrdiff_t js_socket_sendsocket(js_socket_private_t *p, const void *msg, s ...@@ -337,12 +337,8 @@ static ptrdiff_t js_socket_sendsocket(js_socket_private_t *p, const void *msg, s
int copied=0,ret; int copied=0,ret;
char *estr; char *estr;
if(p->session==-1) { if(p->session==-1)
BOOL wr = FALSE;
if(!socket_check(p->sock, NULL, &wr, 0) || !wr)
return 0;
return sendsocket(p->sock, msg, len); return sendsocket(p->sock, msg, len);
}
do { do {
// If we don't limit this, we occasionally get errors on large sends... // If we don't limit this, we occasionally get errors on large sends...
if((ret=cryptPushData(p->session, msg, len > 0x2000 ? 0x2000 : len, &copied))==CRYPT_OK) { if((ret=cryptPushData(p->session, msg, len > 0x2000 ? 0x2000 : len, &copied))==CRYPT_OK) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment