mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-18 08:20:35 +01:00
- [GUI] prevented stack overflow (ensured TCO) when downloading a non gemini text file.
This commit is contained in:
parent
0851c79c8d
commit
b3d7d47f10
@ -1177,7 +1177,9 @@ local file paths."
|
||||
(wait-enough-data)))
|
||||
|
||||
(defun slurp-non-text-data (main-window iri &key (try-to-open t))
|
||||
(declare (optimize (debug 0) (speed 3)))
|
||||
(labels ((wait-until-download-complete (stream-info support-file)
|
||||
(declare (optimize (debug 0) (speed 3)))
|
||||
(if (string-equal (getf stream-info :stream-status)
|
||||
:completed)
|
||||
(if try-to-open
|
||||
@ -1186,12 +1188,14 @@ local file paths."
|
||||
(getf stream-info :meta)))
|
||||
(wait-enough-data)))
|
||||
(buffer-filled-enough-to-open-p (buffer-size read-so-far)
|
||||
(declare (optimize (debug 0) (speed 3)))
|
||||
(let ((filled-configuration-threshold (and buffer-size
|
||||
(> read-so-far buffer-size))))
|
||||
(or filled-configuration-threshold
|
||||
(> read-so-far
|
||||
swconf:+buffer-minimum-size-to-open+))))
|
||||
(wait-enough-data ()
|
||||
(declare (optimize (debug 0) (speed 3)))
|
||||
(let* ((stream-info
|
||||
(cev:enqueue-request-and-wait-results :gemini-stream-info
|
||||
1
|
||||
|
Loading…
x
Reference in New Issue
Block a user