Reg onPostStop is not executing statements inside method
vinaykumar612 opened this issue · comments
vinaykumar612 commented
Support plan
- is this issue currently blocking your project? (yes/no):no
- is this issue affecting a production system? (yes/no):no
Context
- node 17.9.1:
- @hapi/hapi 20.2.1:
- node (e.g. node, browser, native):
- hapi (e.g. hapi application, another framework, standalone, ...):
- any other relevant information:
How can we help?
server.ext({
type: 'onPostStop',
method (request, reply) {
console.log('Application stopped');
},
});
devin ivy commented
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()
.