Not able to start process again on linux after fail

Description

After fail (different reasons, for example network error) app can’t be restarted on same user.

Steps to reproduce

It is happenning randomly daily, logs from one of this encounter:

2023-12-15 22:42:56:201 [ERROR] Failed broadcasting: Network unavailable #same time network was working, it was some network error
2023-12-15 22:43:37:960 [INFO] Lock attempt detected
2023-12-15 22:43:37:960 [INFO] Lock attempt detected
2023-12-15 22:43:39:813 [INFO] Lock attempt detected
2023-12-15 22:43:41:259 [INFO] Lock attempt detected
2023-12-15 22:43:42:413 [INFO] Lock attempt detected
2023-12-15 22:43:43:362 [INFO] Lock attempt detected
2023-12-15 22:49:14:897 [INFO] Lock attempt detected
2023-12-15 22:50:01:147 [INFO] Lock attempt detected
2023-12-15 22:50:36:641 [INFO] Lock attempt detected
2023-12-15 22:50:50:974 [INFO] Lock attempt detected
2023-12-15 22:51:04:126 [INFO] Lock attempt detected
2023-12-15 22:55:22:150 [INFO] Loc2023-12-15 22:55:222023-12-15 22:56:39:413 [INFO] Lock attempt detected
2023-12-15 23:19:12:961 [INFO] Stopping the server, reason: shutdown

After logout (shutdown mentioned above) app started working again:

2023-12-16 00:38:47:829 [INFO] Version: 0.27.5, os: Linux, osVersion: 6.5.13-4-MANJARO
2023-12-16 00:38:48:083 [INFO] Initializing locale to pl
2023-12-16 00:38:48:133 [INFO] Network addresses: NetworkInfo(broadcastAddresses=[172.18.255.255, 192.168.71.255], localAddresses=[172.18.0.1, 192.168.68.126])
2023-12-16 00:38:48:142 [INFO] Starting the server…
2023-12-16 00:38:48:147 [INFO] Waiting for devices from RtAudio…
2023-12-16 00:38:48:196 [INFO] Checking for update…
2023-12-16 00:38:48:463 [INFO] Found no update
2023-12-16 00:40:17:169 [INFO] Remote device connected: 192.168.68.100
2023-12-16 00:40:17:195 [INFO] Received client config, clientVersion: 0.26.1, os: ANDROID, osVersion: Android API 31
2023-12-16 00:40:17:746 [INFO] Audio pipeline is emitting values

ps -e was not showing any audiorelay process this time, but previously I’ve managed to kill it and start it again without loggin out and in. Running with sudo is partly working, but there are network errors (port not available, audio config missing etc).

Devices

Device A:
Linux, osVersion: 6.5.13-4-MANJARO
AudioRelay 0.27.5

Device B:
0.26.1, os: ANDROID, osVersion: Android API 31