I am using electron tray in my application but when I quit the app ,the tray doesn't close immediately.Instead on hover, it closes immediately .Is there any solution that I can use to avoid this?
Try destroying the tray icon before the app quits like this:
app.on('before-quit', function (evt) {
tray.destroy();
});