Skip to content

Commit f2ea473

Browse files
committed
src/modbus.c: response_exception(): fflush() before and after vfprintf() to sync the output
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
1 parent a6d00c8 commit f2ea473

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/modbus.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,9 @@ static int response_exception(modbus_t *ctx,
768768
va_list ap;
769769

770770
va_start(ap, template);
771+
fflush(stderr);
771772
vfprintf(stderr, template, ap);
773+
fflush(stderr);
772774
va_end(ap);
773775
}
774776

0 commit comments

Comments
 (0)