emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals-release/ement fbfa1d5758 2/3: Fix: (ement-initial-sync-


From: ELPA Syncer
Subject: [elpa] externals-release/ement fbfa1d5758 2/3: Fix: (ement-initial-sync-timeout)
Date: Fri, 23 Dec 2022 13:57:42 -0500 (EST)

branch: externals-release/ement
commit fbfa1d5758cba226b1cafc4de99b9316387aea60
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>

    Fix: (ement-initial-sync-timeout)
    
    Use in (ement-connect) and (ement--sync).
---
 README.org | 3 ++-
 ement.el   | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/README.org b/README.org
index 6b396b1391..21790c1373 100644
--- a/README.org
+++ b/README.org
@@ -289,7 +289,8 @@ Note that, while ~matrix-client~ remains usable, and 
probably will for some time
 
 ** 0.5.2-pre
 
-Nothing new yet.
+*Fixes*
++ Apply ~ement-initial-sync-timeout~ properly (important for when the 
homeserver is slow to respond).
 
 ** 0.5.1
 
diff --git a/ement.el b/ement.el
index a9ba44a178..84848161b7 100644
--- a/ement.el
+++ b/ement.el
@@ -257,7 +257,7 @@ the port, e.g.
         (let ((user-id (ement-user-id (ement-session-user session))))
           ;; HACK: If session is already in ement-sessions, this replaces it.  
I think that's okay...
           (setf (alist-get user-id ement-sessions nil nil #'equal) session)
-          (ement--sync session))
+          (ement--sync session :timeout ement-initial-sync-timeout))
       ;; Start password login flow.  Prompt for user ID and password
       ;; if not given (i.e. if not called interactively.)
       (unless user-id
@@ -461,7 +461,7 @@ a filter ID).  When unspecified, the value of
                                          (message "Ement: Sync %s (%s).  
Syncing again..."
                                                   reason (ement-user-id 
(ement-session-user session))))
                                        ;; Set QUIET to allow the just-printed 
message to remain visible.
-                                       (ement--sync session :quiet t)))
+                                       (ement--sync session :timeout timeout 
:quiet t)))
                                     (`(,code . ,message)
                                      (signal 'ement-api-error (list (format 
"Ement: Network error: %s: %s" code message) plz-error)))
                                     (_ (signal 'ement-api-error (list "Ement: 
Unrecognized network error" plz-error)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]