Fix #1266: Proper connection closing on Node.js ComJSEnv
Merge pull request #1267 from gzm0/fix-nodejs-race

Fix #1266: Proper connection closing on Node.js ComJSEnv