(self)
| 328 | response.close() |
| 329 | |
| 330 | def connect(self) -> None: |
| 331 | self.sock = self._new_conn() |
| 332 | if self._tunnel_host: |
| 333 | # If we're tunneling it means we're connected to our proxy. |
| 334 | self._has_connected_to_proxy = True |
| 335 | |
| 336 | # TODO: Fix tunnel so it doesn't depend on self.sock state. |
| 337 | self._tunnel() |
| 338 | |
| 339 | # If there's a proxy to be connected to we are fully connected. |
| 340 | # This is set twice (once above and here) due to forwarding proxies |
| 341 | # not using tunnelling. |
| 342 | self._has_connected_to_proxy = bool(self.proxy) |
| 343 | |
| 344 | if self._has_connected_to_proxy: |
| 345 | self.proxy_is_verified = False |
| 346 | |
| 347 | @property |
| 348 | def is_closed(self) -> bool: |
no test coverage detected