telefonicaid / lightweightm2m-iotagent

IoT Agent accepting COAP requests. Designed to be a bridge between the OMA Lightweight M2M protocol and the NGSI interface.
https://fiware-iotagent-lwm2m.rtfd.io/
GNU Affero General Public License v3.0
24 stars 31 forks source link

Add graceful shutdown #258

Closed jason-fox closed 2 years ago

jason-fox commented 2 years ago

When a shutdown signal is sent, we need to do graceful shutdown out of Node.js and Express to avoid side effects like finishing active requests before closing server, clean up resources, db connections etc.

see: https://stackfame.com/node-express-graceful-shutdown