Skip to content

Commit

Permalink
Fix AsyncShell
Browse files Browse the repository at this point in the history
Fix issue with initial Promise in the
CancellableInputProvider.tuple not being completed,
which would violate the constraint in
CancellableInputProvider.nextAction.
  • Loading branch information
NthPortal committed Jan 6, 2017
1 parent 1678abb commit 7e61acf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/com/nthportal/shell/async/AsyncShell.scala
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ object AsyncShell {
*/
private class CancellableInputProvider(inputProvider: InputProvider) extends InputProvider {
private val tuple: AtomicReference[(Boolean, Promise[InputAction[_]])] =
new AtomicReference((false, Promise[InputAction[_]]()))
new AtomicReference((false, Promise.successful[InputAction[_]](_ => Unit)))

/**
* Attempts to cancel/halt this [[InputProvider]].
Expand Down

0 comments on commit 7e61acf

Please sign in to comment.