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
|
@ -770,6 +770,7 @@ bytevector) as its internal buffer, and a thunk to flush this output port."
|
|||
|
||||
(define (flush)
|
||||
(put-bytevector port buffer 0 total)
|
||||
(force-output port)
|
||||
(set! total 0))
|
||||
|
||||
(define (write bv offset count)
|
||||
|
@ -927,6 +928,7 @@ path."
|
|||
(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 New Issue