use the resume call before pumping data from a reader
This commit is contained in:
parent
4bc6608e87
commit
33c8e34456
@ -120,6 +120,8 @@ class PopenModule(AutoStartModule, metaclass=ABCMeta):
|
|||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
self.process = Popen(self.getCommand(), stdin=PIPE, stdout=PIPE)
|
self.process = Popen(self.getCommand(), stdin=PIPE, stdout=PIPE)
|
||||||
|
# resume in case the reader has been stop()ed before
|
||||||
|
self.reader.resume()
|
||||||
Thread(target=self.pump(self.reader.read, self.process.stdin.write)).start()
|
Thread(target=self.pump(self.reader.read, self.process.stdin.write)).start()
|
||||||
Thread(target=self.pump(partial(self.process.stdout.read, 1024), self.writer.write)).start()
|
Thread(target=self.pump(partial(self.process.stdout.read, 1024), self.writer.write)).start()
|
||||||
|
|
||||||
|
@ -49,6 +49,8 @@ class DirewolfModule(AutoStartModule, DirewolfConfigSubscriber):
|
|||||||
stdin=PIPE,
|
stdin=PIPE,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# resume in case the reader has been stop()ed before
|
||||||
|
self.reader.resume()
|
||||||
threading.Thread(target=self.pump(self.reader.read, self.process.stdin.write)).start()
|
threading.Thread(target=self.pump(self.reader.read, self.process.stdin.write)).start()
|
||||||
|
|
||||||
delay = 0.5
|
delay = 0.5
|
||||||
|
Loading…
Reference in New Issue
Block a user