Changeset f6d2721 in mod_gnutls
- Timestamp:
- Dec 6, 2019, 11:28:23 AM (14 months ago)
- Branches:
- asyncio, master, proxy-ticket
- Children:
- d762813
- Parents:
- 0560bb9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/mgstest/http.py
r0560bb9 rf6d2721 21 21 22 22 from http.client import HTTPConnection 23 from multiprocessing import Process23 from threading import Thread 24 24 25 25 class HTTPSubprocessConnection(HTTPConnection): … … 50 50 # and the socket back to the HTTP connection (write-only). 51 51 self._output_filter = output_filter 52 # output filter process53 self._f proc= None52 # output filter thread 53 self._fthread = None 54 54 55 55 def connect(self): … … 63 63 stdin=s_remote, close_fds=True, 64 64 bufsize=0) 65 self._f proc = Process(target=self._output_filter,66 args=(self._sproc.stdout, s_remote))67 self._f proc.start()65 self._fthread = Thread(target=self._output_filter, 66 args=(self._sproc.stdout, s_remote)) 67 self._fthread.start() 68 68 else: 69 69 self._sproc = subprocess.Popen(self.command, stdout=s_remote, 70 70 stdin=s_remote, close_fds=True, 71 71 bufsize=0) 72 s_remote.close()73 72 self.sock = s_local 74 73 … … 91 90 self.returncode = self._sproc.wait(self.timeout) 92 91 93 # filter processreceives HUP on pipe when the subprocess92 # filter thread receives HUP on pipe when the subprocess 94 93 # terminates 95 if self._f proc:96 self._f proc.join()94 if self._fthread: 95 self._fthread.join() 97 96 98 97 # close the connection in the super class, which also calls
Note: See TracChangeset
for help on using the changeset viewer.