File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 228
228
229
229
(defn inspect-image [{:keys [Name Id]}]
230
230
(curl/get
231
- (format " http://localhost/images/%s/json" (or Name Id))
231
+ (format " http://localhost/images/%s/json" (or Name Id))
232
232
{:raw-args [" --unix-socket" " /var/run/docker.sock" ]
233
233
:throw false }))
234
234
547
547
(let [header-buf (ByteBuffer/allocate 8 )
548
548
stdout (PipedOutputStream. )
549
549
stdout-reader (io/reader (PipedInputStream. stdout))]
550
- (async/go-loop []
551
- (when-let [line (.readLine stdout-reader)]
552
- (async/put! c {:stdout line})
553
- (recur )))
550
+ (.start ^Thread
551
+ (Thread.
552
+ (fn []
553
+ (loop []
554
+ (when-let [line (.readLine stdout-reader)]
555
+ (async/put! c {:stdout line})
556
+ (recur ))))))
554
557
(loop [offset 0 ]
555
558
(let [result (.read ^SocketChannel in header-buf)]
556
559
(cond
656
659
c (async/chan )
657
660
output-channel (async/chan )]
658
661
(start x)
659
- (async/thread (read-loop socket-channel c))
662
+ (.start ^Thread
663
+ (Thread.
664
+ (fn []
665
+ (read-loop socket-channel c))))
660
666
(async/go
661
667
(docker/wait x)
662
668
(async/>! c :stopped )
You can’t perform that action at this time.
0 commit comments