hapijs / hapi

The Simple, Secure Framework Developers Trust
https://hapi.dev
Other
14.63k stars 1.34k forks source link

Reg onPostStop is not executing statements inside method #4438

Open vinaykumar612 opened 1 year ago

vinaykumar612 commented 1 year ago

Support plan

Context

How can we help?

server.ext({
      type: 'onPostStop',
      method (request, reply) {
        console.log('Application stopped');
      },
});
devinivy commented 1 year ago

Sorry, we'll need a lot more information here in order to help you! One thing that stands out in that example is that onPostStop is a server lifecycle extension, so it is not passed request as an argument. In order to trigger this extension point you need to call server.stop().