utun: игнорировать SIGPIPE, чтобы send() в закрытый TCP-сокет не убивал демон

This commit is contained in:
evgeny committed 2026-09-19 10:32:57 +03:00
1 parent 1de1409699
commit 6c42390fc2
1 file changed
+6
+6
View File
@@ -335,6 +335,12 @@ int main(int argc, char *argv[]) {
}
#endif
// Игнорировать SIGPIPE: send() в закрытый TCP-сокет (reality-relay/STCP под сканерами)
// не должен молча убивать демон — ошибки EPIPE обрабатываются по errno в коде.
#ifndef _WIN32
signal(SIGPIPE, SIG_IGN);
#endif
// Enable TUN initialization for VPN functionality
utun_instance_set_tun_init_enabled(1);