mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-21 01:26:43 +01:00
store: Add missing buffer flushes.
This could result in deadlock in unusual situations, whereby we'd start waiting for a reply while the query hasn't been flushed to the socket. * guix/store.scm (buffering-output-port)[flush]: Add call to 'force-output'. (add-to-store): Add call to 'write-buffered-output'.
This commit is contained in:
parent
d68aa41573
commit
3809824199
1 changed files with 2 additions and 0 deletions
|
@ -770,6 +770,7 @@ (define total 0)
|
|||
|
||||
(define (flush)
|
||||
(put-bytevector port buffer 0 total)
|
||||
(force-output port)
|
||||
(set! total 0))
|
||||
|
||||
(define (write bv offset count)
|
||||
|
@ -927,6 +928,7 @@ (define add-to-store
|
|||
(write-int (if recursive? 1 0) port)
|
||||
(write-string hash-algo port)
|
||||
(write-file file-name port #:select? select?)
|
||||
(write-buffered-output server)
|
||||
(let loop ((done? (process-stderr server)))
|
||||
(or done? (loop (process-stderr server))))
|
||||
(read-store-path port)))))
|
||||
|
|
Loading…
Reference in a new issue