Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8b59ef2038 | |||
| 4d8500d97d | |||
| 57a157bad7 |
File diff suppressed because one or more lines are too long
@@ -22,6 +22,13 @@ rescue => e
|
||||
exit 1
|
||||
end
|
||||
|
||||
puts ' ___ __ ___ ___ ___ '
|
||||
puts ' |\/| | |\ | |__ /__` |__ |\ | | | |\ | |__ | '
|
||||
puts ' | | | | \| |___ .__/ |___ | \| | | | \| |___ |___ '
|
||||
puts " MineSentinel dev-rolling version by <*> S.A. [@Snoware] and owned by SCU team."
|
||||
puts " This program is licensed under Mulan PubL v2."
|
||||
puts " E-mail the author for more information: SALflake@qq.com or visit https://https://swe-iss.rth1.xyz/softwares/minesentinel."
|
||||
|
||||
require_relative 'method_executor' # 日志系统在此时初始化
|
||||
require_relative 'server_status_detector'
|
||||
require_relative 'systemd_notifier' # 心跳系统在此时初始化
|
||||
|
||||
+5
-1
@@ -27,7 +27,11 @@ class SystemdNotifier
|
||||
else
|
||||
MethodExecutor.record("debug", "heartbeat", "Found NOTIFY_SOCKET, enabling heartbeat")
|
||||
@enable_heartbeat = true
|
||||
@socket = UNIXSocket.new(@notify_socket)
|
||||
# Fix(2026-06-08): 将 UNIXSocket(SOCK_STREAM) 改为 SOCK_DGRAM
|
||||
# systemd NOTIFY_SOCKET 是 datagram socket,用 stream socket 连接会报
|
||||
# Protocol wrong type for socket (Errno::EPROTOTYPE)
|
||||
@socket = Socket.new(Socket::AF_UNIX, Socket::SOCK_DGRAM)
|
||||
@socket.connect(Socket.pack_sockaddr_un(@notify_socket))
|
||||
MethodExecutor.record("debug", "heartbeat", "Heartbeat socket opened")
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user