File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -475,8 +475,6 @@ K mqttCallback(int fd){
475
475
break ;
476
476
case MSG_TYPE_RCVD :{
477
477
const long expected = cb_data .body .size ;
478
- // Don't use MSG_WAITALL since async sd1(-fd, ...) was used. So call recv until we have
479
- // the expected number of bytes otherwise the message sequencing can get out of step.
480
478
long actual ;
481
479
char * body = malloc (expected );
482
480
for (rc = 0 , actual = 0 ;
@@ -521,8 +519,7 @@ EXP K init(K UNUSED(X)){
521
519
fprintf (stderr ,"Init failed. socketpair: %s\n" , getSysError (buff ,sizeof (buff )));
522
520
return 0 ;
523
521
}
524
- // Have to use (0 - fd) rather than simple negate, since SOCKET on Windows is unsigned ptr.
525
- pr0 (sd1 (0 - spair [0 ], & mqttCallback ));
522
+ pr0 (sd1 (spair [0 ], & mqttCallback ));
526
523
validinit = 1 ;
527
524
atexit (detach );
528
525
return 0 ;
You can’t perform that action at this time.
0 commit comments