keymetrics / pm2-io-apm

PM2.io APM for Node.JS
Apache License 2.0
147 stars 40 forks source link

entrypoint.js exit without having called the cb of onStop #203

Closed Unitech closed 5 years ago

Unitech commented 6 years ago
var Entrypoint = require('@pm2/io').Entrypoint

new class App extends Entrypoint {
  onStart(cb) {                                                                                                                                                                                 
    console.log('started')
    return cb()
  }

  onStop(err, cb) {
    console.log('should not exit without having called the callback')
  }
}

when starting this app, it should not auto exit because the cb of onStop has never been called