Don't leak slave's main IO streams.

This commit is contained in:
David Wilson 2016-08-11 17:54:00 +01:00
parent 70c2032bb2
commit 6f1b6df0f9
1 changed files with 2 additions and 0 deletions

View File

@ -376,6 +376,8 @@ class Stream(BasicStream):
def Accept(self, rfd, wfd): def Accept(self, rfd, wfd):
self.read_side = Side(self, os.dup(rfd)) self.read_side = Side(self, os.dup(rfd))
self.write_side = Side(self, os.dup(wfd)) self.write_side = Side(self, os.dup(wfd))
set_cloexec(self.read_side.fd)
set_cloexec(self.write_side.fd)
self._context.stream = self self._context.stream = self
def Connect(self): def Connect(self):