diff options
author | Boutade <thegoofist@protonmail.com> | 2019-09-25 08:22:16 -0500 |
---|---|---|
committer | Boutade <thegoofist@protonmail.com> | 2019-09-25 08:22:16 -0500 |
commit | 6618943207bfad3947e0029637e5fe71d7cbd3d8 (patch) | |
tree | 4a789c5ed754e43a0fd78cf75d2b5e46fad6f53f | |
parent | 4b145df75ee4d10e079f3a91afbb33b69cce2a80 (diff) |
added timeout to client
-rw-r--r-- | granolin.lisp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/granolin.lisp b/granolin.lisp index a2fc4d7..74afa7a 100644 --- a/granolin.lisp +++ b/granolin.lisp @@ -22,6 +22,12 @@ :initarg :homeserver :initform (error "HOMESERVER is required.") :type string) + (timeout + :accessor timeout + :initarg :timeout + :initform (* 1000 10) + :type integer + :documentation "The length of time, in ms, to wait during long-polling to /sync") (access-token :accessor access-token :initform nil @@ -243,6 +249,7 @@ " (let (params) (push (cons "full_state" full-state) params) + (push (cons "timeout" (timeout client)) params) (when (next-batch client) (push (cons "since" (next-batch client)) params)) @@ -276,3 +283,5 @@ (dolist (ob (getob room :|invite_state| :|events|)) (setf (invitation-event-data invite-event) ob) (handle-invitation-event client room-id invite-event))))) + + |