Just to add, I recently made a change (it'll auto-build to http://www.espruino.com/binaries/git/commits/5ae24206fb924569f14265fa57372132356a7a75 soon, or will be in 1v78) that may well fix the problem you're having with close not being called.
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Just to add, I recently made a change (it'll auto-build to http://www.espruino.com/binaries/git/commits/5ae24206fb924569f14265fa57372132356a7a75 soon, or will be in 1v78) that may well fix the problem you're having with close not being called.