JSDB branch: persistent chat example error on database deletion
Following the deletion of the database in the persistent chat example (which happens every hour), the following error is observed:
💬 ❨Chat❩ New client connected to room /chat.
💞 ↓ GET 404 0.4 ms 0.7 kb 💠 /favicon.ico
💬 ❨Chat❩ message broadcast to 1 recipient in room /chat.
💾 ❨JSDB❩ Deleting table messages…
💾 ❨JSDB❩ │ ╰─ Closing table messages…
💾 ❨JSDB❩ │ ╰─ Closed table messages.
💾 ❨JSDB❩ ╰─ Table in messages deleted.
💾 ❨JSDB❩ Removing table messages from database…
💾 ❨JSDB❩ ╰─ Table in messages removed from database.
💬 ❨Chat❩ Housekeeping: chat log cleared.
(node:23086) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'delete' of null
at Timeout._onTimeout (/home/aral/small-tech/site.js/app/examples/persisted-chat/.dynamic/.wss/chat.js:17:23)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)