34 lines
933 B
Diff
34 lines
933 B
Diff
From 7dea4930d6118ffb650a34aafc7a37dcdb198cf9 Mon Sep 17 00:00:00 2001
|
|
From: huyubiao <h13958451065@163.com>
|
|
Date: Thu, 8 Jun 2023 10:36:38 +0800
|
|
Subject: [PATCH] fix: commands connection timeout causing event blocking
|
|
|
|
---
|
|
core/bin/manager/commands.rs | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/core/bin/manager/commands.rs b/core/bin/manager/commands.rs
|
|
index 94877a2..0727295 100644
|
|
--- a/core/bin/manager/commands.rs
|
|
+++ b/core/bin/manager/commands.rs
|
|
@@ -41,7 +41,7 @@ impl<T> Commands<T> {
|
|
let socket_fd = socket::socket(
|
|
socket::AddressFamily::Unix,
|
|
socket::SockType::Stream,
|
|
- socket::SockFlag::empty(),
|
|
+ socket::SockFlag::SOCK_CLOEXEC | socket::SockFlag::SOCK_NONBLOCK,
|
|
None,
|
|
)
|
|
.unwrap();
|
|
@@ -112,6 +112,6 @@ where
|
|
}
|
|
|
|
fn priority(&self) -> i8 {
|
|
- 10i8
|
|
+ 0i8
|
|
}
|
|
}
|
|
--
|
|
2.33.0
|
|
|