Open bnonni opened 2 months ago
My first thought was the quickest and dirtiest way: simply try-catch the listen method. My concern is that I don't know what I don't know there, so I'm afraid I'm missing some glaring edge case that will still result in the loop dying.
Then, I began wondering if what a more elegant and performant solution might look like and thought we could integrate a use a node.js http server like the dwn-server, but I imagine that taking a bit more time, designing and thinking.
Worst case scenario, I can implement an overt amount of try-catchs and we can use a process manager like powerman (pm2) to restart any killed process.
Summary
Currently, the
server
andissuer
packages have server-like features that are not fault tolerant. If an error is thrown, it will bubble up to caller and kill the loop. We need to design and implement a simple and effective way to achieve fault tolerance for all server-like looping mechanisms involved in running dcx.Requirements
server
issuer