Skip to content

Conversation

@Fropops
Copy link

@Fropops Fropops commented Jul 27, 2023

The current use of PeekNamedPipe does not work properly.
As the result of the API call to PeekNamedPipe only indicates whether the call is successful but does not provide any information about the availability of data.
In the Drone program, the thread is then blocked on the "pipe.ReadStream()", preventing the loop to operate.

I changed it to effectively check the number of bytes available.
Also, I added a throw when the call is not succeeding which will enable to properly close the communicator using the OnException event (I think it was already working because the pipe.ReadStream throws an exception when the pipe is closed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant