summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Harris <pharris@opentext.com>2022-11-02 15:38:19 -0400
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-11-10 18:12:20 +0000
commit5ca90ec8665294cb8499a54c303b8275eeeaaf4d (patch)
tree332c238ffda1d0d33435b36f8b822a901fb38ab9
parent644bea5c481365343e709d0f2ddbc553a6d8fc30 (diff)
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 <pharris@opentext.com>
-rw-r--r--src/fc/fserve.c2
1 files changed, 2 insertions, 0 deletions
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)