Merge pull request #6113 from eatkins/thin-client-shutdown

Fix shutdown for thin client shell
This commit is contained in:
eugene yokota 2020-11-18 18:25:36 -05:00 committed by GitHub
commit 9abcbfa31b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -160,7 +160,9 @@ private[sbt] final class CommandExchange {
channelBufferLock.synchronized {
Util.ignoreResult(channelBuffer -= c)
}
commandQueue.removeIf(_.source.map(_.channelName) == Some(c.name))
commandQueue.removeIf { e =>
e.source.map(_.channelName) == Some(c.name) && e.commandLine != Shutdown
}
currentExec.filter(_.source.map(_.channelName) == Some(c.name)).foreach { e =>
Util.ignoreResult(NetworkChannel.cancel(e.execId, e.execId.getOrElse("0")))
}