ml-research / liground

A free, open-source and modern Chess Variant Analysis GUI for the 21st century

Home Page:https://ml-research.github.io/liground.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does liground send a quit command to engines before quitting?

tsoj opened this issue · comments

commented

When I close LiGround, sometimes engine processes continue to exist and run. I also saw this happening with Nibbler, where the solution was to set quit commands to all engines, before quitting the program itself.

Hello @tsoj ,
thank you for the bug report.

There is a quit() method already, but I think it is not called on the program close event right now.

/**
* Tell the engine to quit.
*/
async quit () {
// check for already destroyed stream
if (this.input.destroyed) {
return
}
// wait for ready, then quit & wait for stream close
await this.waitForReady()
this._write('quit')
await waitFor(this.input, 'close')
}

This issue may also be related to