Why is the Join service being killed on MIUI Roms?

Thanks to Michał Miłkowski for his insight:

“Basically, MIUI (custom ROM from Xiaomi) has inbuilt battery saver (been there since at least MIUI v4, latest is v8 and is one I’m using now) and it kills joinapp listener background process. To prevent it, you need to do 2 things – disable energy saving for selected app (joinapp) and add it to autostart (so listener starts every time you reboot/update phone). To disable energy saving, you have 2 ways to do that – Security app > Battery > App battery saver > select Join from app list and select No restrictions in Background settings. Second way is simpler, hold Home button to open list of launched apps, drag down Join and click lock button. It will lock app in memory, so listener isn’t killed. However I’m not sure if it keeps lock after reboot, so you may need to use 1st way (app energy saver settings).

To add Join to autostart, Security > Permissions > Autostart > enable Join”