aboutsummaryrefslogtreecommitdiff
path: root/Hotline
diff options
context:
space:
mode:
authorDustin Mierau <dustin@mierau.me>2024-01-14 21:06:15 -0800
committerDustin Mierau <dustin@mierau.me>2024-01-14 21:06:15 -0800
commit6737887368446f2ee9ae7c8cee672956d398585e (patch)
tree7b3f663f888c86dc4efdb944be33d6fed2fca408 /Hotline
parentfffb072dcd736a061186f44511d2a10cb41e8b42 (diff)
Disable custom TCP keepalive settings. Just use defaults. Seeing some weird disconnecting.
Diffstat (limited to 'Hotline')
-rw-r--r--Hotline/Shared/NetSocket.swift20
1 files changed, 10 insertions, 10 deletions
diff --git a/Hotline/Shared/NetSocket.swift b/Hotline/Shared/NetSocket.swift
index 5b33f61..a7d44ce 100644
--- a/Hotline/Shared/NetSocket.swift
+++ b/Hotline/Shared/NetSocket.swift
@@ -254,16 +254,16 @@ final class NetSocket: NSObject, StreamDelegate {
if setsockopt(socketHandle, SOL_SOCKET, SO_KEEPALIVE, &value, size) != 0 {
print("NetSocket: failed to set SO_KEEPALIVE");
}
- // Number of keepalives before close (including first keepalive packet)
- value = 5
- if setsockopt(socketHandle, IPPROTO_TCP, TCP_KEEPCNT, &value, size) != 0 {
- print("NetSocket: failed to set TCP_KEEPCNT");
- }
- // Idle time used when SO_KEEPALIVE is enabled. Sets how long connection must be idle before keepalive is sent.
- value = 60
- if setsockopt(socketHandle, IPPROTO_TCP, TCP_KEEPALIVE, &value, size) != 0 {
- print("NetSocket: failed to set TCP_KEEPALIVE")
- }
+// // Number of keepalives before close (including first keepalive packet)
+// value = 5
+// if setsockopt(socketHandle, IPPROTO_TCP, TCP_KEEPCNT, &value, size) != 0 {
+// print("NetSocket: failed to set TCP_KEEPCNT");
+// }
+// // Idle time used when SO_KEEPALIVE is enabled. Sets how long connection must be idle before keepalive is sent.
+// value = 60
+// if setsockopt(socketHandle, IPPROTO_TCP, TCP_KEEPALIVE, &value, size) != 0 {
+// print("NetSocket: failed to set TCP_KEEPALIVE")
+// }
}
}
}