mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-14 21:51:04 +00:00
Update pipe-ipc.js
This commit is contained in:
parent
37ce45c983
commit
a3e407b3e0
|
@ -45,17 +45,17 @@ function PipeIPC() {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.write = function(message) {
|
this.write = function(message) {
|
||||||
var isWrote = false;
|
var isWritten = false;
|
||||||
|
|
||||||
while (!isWrote) {
|
while (!isWritten) {
|
||||||
try {
|
try {
|
||||||
this.createWriter();
|
this.createWriter();
|
||||||
this.writer.Write(message);
|
this.writer.Write(message);
|
||||||
sleep(1);
|
sleep(1);
|
||||||
this.writer.Close();
|
this.writer.Close();
|
||||||
isWrote = true;
|
isWritten = true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
isWrote = false;
|
isWritten = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user