ttynvt: Move optional delay during close

Move to after closing the fds.

As suggested in https://gitlab.com/lars-thrane-as/ttynvt/-/issues/11.
This commit is contained in:
Kim Woelders
2025-02-25 20:02:36 +01:00
parent 1f516288ab
commit 4d3f7d384b
+3 -3
View File
@@ -1118,13 +1118,13 @@ static void ttynvt_release(fuse_req_t req, struct fuse_file_info *info)
pthread_mutex_destroy(&tty->tty_lock);
pthread_mutex_destroy(&tty->poll_lock);
if (ttynvt_param.close_delay_us)
_ttynvt_sleep_us(ttynvt_param.close_delay_us);
_fd_close(tty->fds[FD_NET].fd);
_fd_close(tty->fds[FD_MASTER].fd);
_fd_close(tty->fds[FD_SLAVE].fd);
if (ttynvt_param.close_delay_us)
_ttynvt_sleep_us(ttynvt_param.close_delay_us);
if (tty->ph)
fuse_pollhandle_destroy(tty->ph);