Fix idle timer never expiring due to remote user activity
The log activity check matched "Folder contents", "Browse response", and "search response" patterns which are triggered by remote users browsing the shared library — not local user activity. This constant passive traffic kept resetting the idle timer, preventing disconnect. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# Activity is detected by:
|
||||
# 1. Active downloads in progress via the API
|
||||
# 2. Recent log activity (searches, browsing, downloads) in docker logs
|
||||
# 2. Recent log activity (downloads, fresh connections) in docker logs
|
||||
#
|
||||
# Uploads do NOT reset the idle timer, but an in-progress upload will
|
||||
# delay disconnection until it finishes.
|
||||
@@ -84,7 +84,7 @@ has_active_uploads() {
|
||||
has_recent_log_activity() {
|
||||
local count
|
||||
count=$(docker logs "$CONTAINER_NAME" --since "${LOG_CHECK_MIN}m" 2>&1 \
|
||||
| grep -cE '\[DOWNLOAD\]|search response|Folder contents|Browse response|Connected to the Soulseek' || true)
|
||||
| grep -cE '\[DOWNLOAD\]|Connected to the Soulseek' || true)
|
||||
[ "${count:-0}" -gt 0 ]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user