Skip to content

Commit

Permalink
Increase the size of the chunks sent to the from command
Browse files Browse the repository at this point in the history
issue #67
  • Loading branch information
sedwards2009 committed Jan 23, 2018
1 parent 2f44eab commit 8f53a5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/commands/exfrom.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def requestFrame(frame_name):
new_settings[3] = new_settings[3] & ~termios.ECHO # lflags
termios.tcsetattr(fd, termios.TCSADRAIN, new_settings)

# Run in terminal cbreak mode because we need to read (very) long lines which cooked mode will truncate.
tty.setcbreak(fd)

# Set up a hook to restore the tty settings at exit.
def restoreTty():
termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
Expand Down Expand Up @@ -90,7 +93,7 @@ def restoreTty():
try:
while True:
line = sys.stdin.readline().strip()

if len(line) < COMMAND_PREFIX_LENGTH + 1 + HASH_LENGTH:
return FrameReadError("Error while reading frame body data. Line is too short.")

Expand Down
2 changes: 1 addition & 1 deletion src/render_process/bulk_file_handling/BulkFileUploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import log from '../../logging/LogDecorator';
import {Pty, BufferSizeChange} from '../../pty/Pty';


const BYTES_PER_LINE = 90;
const BYTES_PER_LINE = 3 * 1024;

/**
* Uploads files to a remote process over shell and remote's stdin.
Expand Down

0 comments on commit 8f53a5e

Please sign in to comment.