// 1/ cancel the process
// 2/ wait a few milli seconds
// 3/ if it's not ended then we end it
final ClientProcessContext context = current;
Statement statements = new Statement() {
@Override
protected void run() throws Throwable {
context.end(ShellResponse.cancelled());
}
}.with(new Statement() {
@Override
protected void run() throws Throwable {
context.process.cancel();
}
});
statements.all();
}
} else if (msg instanceof ClientMessage.Close) {
close();
}
}