mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
updated nio native code to properly check for PIPE closure on POSIX OSes
This commit is contained in:
parent
447741d6ec
commit
77fb0083a4
@ -521,15 +521,18 @@ class Pipe {
|
||||
if (setBlocking(e, pipe[0], false)) {
|
||||
setBlocking(e, pipe[1], false);
|
||||
}
|
||||
|
||||
open_ = true;
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
::close(pipe[0]);
|
||||
::close(pipe[1]);
|
||||
open_ = false;
|
||||
}
|
||||
|
||||
bool connected() {
|
||||
return true;
|
||||
return open_;
|
||||
}
|
||||
|
||||
int reader() {
|
||||
@ -542,6 +545,7 @@ class Pipe {
|
||||
|
||||
private:
|
||||
int pipe[2];
|
||||
bool open_;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user