phanalpha commented on code in PR #24:
URL: https://github.com/apache/skywalking-php/pull/24#discussion_r1000187237


##########
src/channel.rs:
##########
@@ -33,7 +33,7 @@ static RECEIVER: OnceCell<Mutex<Option<StdUnixStream>>> = 
OnceCell::new();
 pub fn init_channel() -> anyhow::Result<()> {
     let (sender, receiver) = StdUnixStream::pair()?;
 
-    sender.set_nonblocking(true)?;
+    sender.set_nonblocking(false)?;

Review Comment:
   IMHO, `UnixDatagram` is a better choice here. A `Datagram` is either sent or 
not. At least the failure is localized, which simplifies the logic. A blocking 
sender does not actually solve the problem but makes the behavior predictable. 
I think we could fix it in another PR. We are actually implementing a local 
proxy to the backend. I'm not quite sure whether it is a good design.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to