Forked from ZaWertun/sshuttle-1.0.1-no-attribute-set_blocking.patch
Created
July 7, 2020 10:58
-
-
Save s3gm3nt4ti0nf4ult/960c978f1d197c6f794ed12026f8d071 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff -r -U3 sshuttle-1.0.1.orig/sshuttle/ssnet.py sshuttle-1.0.1/sshuttle/ssnet.py | |
| --- sshuttle-1.0.1.orig/sshuttle/ssnet.py 2020-06-05 00:43:00.000000000 +0300 | |
| +++ sshuttle-1.0.1/sshuttle/ssnet.py 2020-07-01 12:15:35.206952388 +0300 | |
| @@ -439,7 +439,8 @@ | |
| callback(cmd, data) | |
| def flush(self): | |
| - os.set_blocking(self.wfile.fileno(), False) | |
| + if 'set_blocking' in dir(os): | |
| + os.set_blocking(self.wfile.fileno(), False) | |
| if self.outbuf and self.outbuf[0]: | |
| wrote = _nb_clean(os.write, self.wfile.fileno(), self.outbuf[0]) | |
| debug2('mux wrote: %r/%d\n' % (wrote, len(self.outbuf[0]))) | |
| @@ -449,7 +450,8 @@ | |
| self.outbuf[0:1] = [] | |
| def fill(self): | |
| - os.set_blocking(self.rfile.fileno(), False) | |
| + if 'set_blocking' in dir(os): | |
| + os.set_blocking(self.rfile.fileno(), False) | |
| try: | |
| read = _nb_clean(os.read, self.rfile.fileno(), LATENCY_BUFFER_SIZE) | |
| except OSError: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment