v1.3.1 - Hotfix: Unlimited Socket Timeout for Large Files

🔧 Critical Fix:
- Changed socket timeout from 5 minutes to UNLIMITED (0)
- Supports files of ANY size (50GB+)
- Keepalive protection prevents zombie connections

📊 Why This Fix:
- 5 minute timeout was insufficient for large files with 6 parallel connections
- Example: 15GB file @ 30 MB/s = 8.3 minutes (exceeded 5 min timeout)
- With unlimited timeout + keepalive, files of any size will upload successfully

🛡️ Safety:
- Aggressive keepalive (10s idle, 5s probe, 3 retries) detects dead connections in ~25s
- No risk of zombie connections or resource leaks
- Dead connections are automatically closed by keepalive

📝 Files Changed:
- payload/main.c: Changed tv.tv_sec from 300 to 0
- payload/ps5_upload_server.elf: Recompiled with unlimited timeout
This commit is contained in:
Manos committed 2026-01-13 01:33:29 +02:00
1 parent 68d586de97
commit e3bfa54994
3 files changed
+4 -3

No files matched your search

Binary file not shown.
+4 -3
View File
@@ -1139,10 +1139,11 @@ int main() {
// NOTE: Removed TCP_NOPUSH - it was causing buffering delays!
// CRITICAL: Set very long timeout to prevent drops on large files
// Large files (15GB) can take minutes to upload
// CRITICAL: Unlimited timeout for files of ANY size
// Keepalive will detect and close dead connections (~25s)
// This allows 50GB+ files to upload without timeout issues
struct timeval tv;
tv.tv_sec = 300; // 5 minutes timeout
tv.tv_sec = 0; // 0 = unlimited timeout
tv.tv_usec = 0;
setsockopt(client_sock, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
setsockopt(client_sock, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv));
Binary file not shown.