linkie / linkie-web

The source code of the backend server and frontend webpage of Linkie Web
https://linkie-web.vercel.app
39 stars 10 forks source link

make backend on app exit termination work #9

Closed meadowsys closed 1 year ago

meadowsys commented 1 year ago

I've moved the on exit event trigger to terminate the backend to RunEvent::Exit (from WindowEvent::Destroyed).

The old termination on app exit doesn't work as expected, and the backend process sticks around, orphaned, which is not only a resource leak but also hogs the server port so the backend isn't successful in starting up when opening the app again. This trigger is almost straight copy-pasted and I can confirm locally it works as expected.

shedaniel commented 1 year ago

Thank you! I don't really know what I am doing with tauri (I don't know rust or tauri really), so this is great help!