@@ -467,13 +467,6 @@ static void fpm_read(struct thread *t)
467
467
/* Let's ignore the input at the moment. */
468
468
rv = stream_read_try (fnc -> ibuf , fnc -> socket ,
469
469
STREAM_WRITEABLE (fnc -> ibuf ));
470
- /* We've got an interruption. */
471
- if (rv == -2 ) {
472
- /* Schedule next read. */
473
- thread_add_read (fnc -> fthread -> master , fpm_read , fnc ,
474
- fnc -> socket , & fnc -> t_read );
475
- return ;
476
- }
477
470
if (rv == 0 ) {
478
471
atomic_fetch_add_explicit (& fnc -> counters .connection_closes , 1 ,
479
472
memory_order_relaxed );
@@ -492,14 +485,20 @@ static void fpm_read(struct thread *t)
492
485
FPM_RECONNECT (fnc );
493
486
return ;
494
487
}
488
+
489
+ /* Schedule the next read */
490
+ thread_add_read (fnc -> fthread -> master , fpm_read , fnc , fnc -> socket ,
491
+ & fnc -> t_read );
492
+
493
+ /* We've got an interruption. */
494
+ if (rv == -2 )
495
+ return ;
496
+
495
497
stream_reset (fnc -> ibuf );
496
498
497
499
/* Account all bytes read. */
498
500
atomic_fetch_add_explicit (& fnc -> counters .bytes_read , rv ,
499
501
memory_order_relaxed );
500
-
501
- thread_add_read (fnc -> fthread -> master , fpm_read , fnc , fnc -> socket ,
502
- & fnc -> t_read );
503
502
}
504
503
505
504
static void fpm_write (struct thread * t )
0 commit comments