From 5ca90ec8665294cb8499a54c303b8275eeeaaf4d Mon Sep 17 00:00:00 2001 From: Peter Harris Date: Wed, 2 Nov 2022 15:38:19 -0400 Subject: Fix font server reconnection timeout The great libxfont2 rewrite 135fb032e940ce226c9feb13e6e903f3ecbc5eb0 split fs_wakeup into fs_wakeup and fs_fd_handler. The fs_fd_handler side is called when there is new data on the socket. The fs_wakeup side is called on a timeout. If there's a connection timeout, the block handler will set the timeout to zero, expecting fs_wakeup to handle the timeout. Therefore, we need to call _fs_check_reconnect in fs_wakeup to handle the connection timeout. If we don't, the X server will go to 100% CPU (and the font server connection will not be retried). Signed-off-by: Peter Harris --- src/fc/fserve.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fc/fserve.c b/src/fc/fserve.c index c676234..eecf17c 100644 --- a/src/fc/fserve.c +++ b/src/fc/fserve.c @@ -1484,6 +1484,8 @@ fs_wakeup(FontPathElementPtr fpe) { FSFpePtr conn = (FSFpePtr) fpe->private; + if ((conn->blockState & FS_RECONNECTING)) + _fs_check_reconnect (conn); if (conn->blockState & (FS_PENDING_REPLY|FS_BROKEN_CONNECTION|FS_BROKEN_WRITE)) _fs_do_blocked (conn); if (conn->blockState & FS_COMPLETE_REPLY) -- cgit v1.2.3