File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change 240
240
(defn wrap-future
241
241
[^Future f]
242
242
(when f
243
- (if ( .isSuccess f)
244
- (d/success-deferred (.getNow f) nil )
245
- ( let [d ( d/deferred nil )
246
- ; ; Ensure the same bindings are installed on the Netty thread (vars,
247
- ; ; classloader) than the thread registering the
248
- ; ; `operationComplete` callback.
249
- bound-operation-complete (bound-fn* operation-complete)]
250
- (.addListener f
251
- (reify GenericFutureListener
252
- (operationComplete [_ _]
253
- (ensure-dynamic-classloader )
254
- (bound-operation-complete f d))))
255
- d) )))
243
+ (let [d ( d/deferred nil )]
244
+ (if (.isDone f )
245
+ ( operation-complete f d )
246
+ ; ; Ensure the same bindings are installed on the Netty thread (vars,
247
+ ; ; classloader) than the thread registering the
248
+ ; ; `operationComplete` callback.
249
+ ( let [ bound-operation-complete (bound-fn* operation-complete)]
250
+ (.addListener f
251
+ (reify GenericFutureListener
252
+ (operationComplete [_ _]
253
+ (ensure-dynamic-classloader )
254
+ (bound-operation-complete f d)) ))))
255
+ d )))
256
256
257
257
(defn allocate [x]
258
258
(if (instance? Channel x)
You can’t perform that action at this time.
0 commit comments