* [PATCH 8/9] net_reader: set SO_KEEPALIVE on all Net::NNTP sockets
2021-09-18 9:33 5% [PATCH 0/9] lei: a bunch of random stuff Eric Wong
@ 2021-09-18 9:33 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-09-18 9:33 UTC (permalink / raw)
To: meta
SO_KEEPALIVE can prevent stuck processes and is safe to enable
unconditionally on all TCP sockets (like git, and the rest of
public-inbox does). Verified via strace on both NNTP and NNTPS
with and without nntp.proxy=socks5h://...
---
lib/PublicInbox/NetReader.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/PublicInbox/NetReader.pm b/lib/PublicInbox/NetReader.pm
index 403df952..28e20d38 100644
--- a/lib/PublicInbox/NetReader.pm
+++ b/lib/PublicInbox/NetReader.pm
@@ -182,6 +182,7 @@ sub nn_new ($$$) {
} else {
$nn = Net::NNTP->new(%$nn_arg) or return;
}
+ setsockopt($nn, Socket::SOL_SOCKET(), Socket::SO_KEEPALIVE(), 1);
# default to using STARTTLS if it's available, but allow
# it to be disabled for localhost/VPN users
^ permalink raw reply related [relevance 7%]
* [PATCH 0/9] lei: a bunch of random stuff
@ 2021-09-18 9:33 5% Eric Wong
2021-09-18 9:33 7% ` [PATCH 8/9] net_reader: set SO_KEEPALIVE on all Net::NNTP sockets Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-09-18 9:33 UTC (permalink / raw)
To: meta
The unique timers stuff will be used for "lei up" polling,
as will 9/9 to improve "lei up" usability.
The net_reader changes were noticed while getting imaps://
to work with socks5h:// (not just imap://).
There's still a lot of mail_sync stuff going on, but it's
getting closer...
Eric Wong (9):
lei: lock worker counts
lei_mail_sync: rely on flock(2), avoid IPC
lei_mail_sync: set nodatacow on btrfs
ds: support add unique timers
net_reader: tie SocksDebug to {imap,nntp}.Debug
net_reader: detect IMAP failures earlier
net_reader: support imaps:// w/ socks5h:// proxy
net_reader: set SO_KEEPALIVE on all Net::NNTP sockets
lei up: automatically use dt: for remote externals
Documentation/lei-up.pod | 15 ++++
lib/PublicInbox/DS.pm | 100 +++++++++++++-------------
lib/PublicInbox/LEI.pm | 40 +++++------
lib/PublicInbox/LeiExportKw.pm | 32 ++++-----
lib/PublicInbox/LeiForgetMailSync.pm | 6 +-
lib/PublicInbox/LeiImport.pm | 8 +--
lib/PublicInbox/LeiInput.pm | 2 +-
lib/PublicInbox/LeiInspect.pm | 5 +-
lib/PublicInbox/LeiLsMailSource.pm | 3 +-
lib/PublicInbox/LeiLsMailSync.pm | 3 +-
lib/PublicInbox/LeiLsSearch.pm | 2 +-
lib/PublicInbox/LeiMailSync.pm | 51 ++++++++++---
lib/PublicInbox/LeiNoteEvent.pm | 31 ++++----
lib/PublicInbox/LeiRefreshMailSync.pm | 35 ++++-----
lib/PublicInbox/LeiRm.pm | 2 +-
lib/PublicInbox/LeiSavedSearch.pm | 1 +
lib/PublicInbox/LeiStore.pm | 39 +---------
lib/PublicInbox/LeiTag.pm | 3 +-
lib/PublicInbox/LeiToMail.pm | 10 ++-
lib/PublicInbox/LeiUp.pm | 2 +-
lib/PublicInbox/LeiXSearch.pm | 50 ++++++++++---
lib/PublicInbox/NetReader.pm | 26 ++++---
t/lei-q-remote-import.t | 4 ++
23 files changed, 259 insertions(+), 211 deletions(-)
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-09-18 9:33 5% [PATCH 0/9] lei: a bunch of random stuff Eric Wong
2021-09-18 9:33 7% ` [PATCH 8/9] net_reader: set SO_KEEPALIVE on all Net::NNTP sockets Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).