refactor: make sure proper sockets cleanup is performed in App.run#5057
Conversation
8ba5b03 to
e6c08d0
Compare
e6c08d0 to
a23182e
Compare
|
So on #5045, we added a socket close here: postgrest/src/PostgREST/Admin.hs Lines 41 to 43 in 9f3dc46 Which makes me wonder, should we move postgrest/src/PostgREST/Admin.hs Lines 26 to 27 in 9f3dc46 To |
That would make Not opposing this but I'd say this should be a separate refactoring PR. I also think we should go even further and "pull up" main thread id from |
Agreed. |
See #5076
See #5056 |
Right now code in App.run does not properly use bracket/finally to close sockets and clean-up mainSocketRef. This is not a big problem at the moment because the application is going to exit enyway but introducting proper resource handling will make future refactorings safer.
a23182e to
7b500b3
Compare
Right now code in App.run does not properly use bracket/finally to close sockets and clean-up mainSocketRef. This is not a big problem at the moment because the application is going to exit enyway but introducting proper resource handling will make future refactorings safer.