8000 Input lag? · Issue #118 · chjj/pty.js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Input lag? #118
Closed
Closed
@s4y

Description

@s4y

I'm running into a strange problem with pty.js 0.2.7-1 and node v0.12.2: sometimes, input (or possibly output?) gets stuck in a buffer, and doesn't come out until I hit another key. Here's my test case:

var pty = require('pty.js');

var winsize = process.stdout.getWindowSize();

term = pty.spawn(process.env.SHELL || '/bin/sh', [], {
    name: process.env.TERM || 'xterm',
    rows: winsize[1],
    cols: winsize[0]
});

process.stdin.setRawMode(true);
process.stdin.pipe(term);
term.pipe(process.stdout);

In the below gif, I type exit at a slow but regular pace: about two characters a second. But it comes out two characters at a time. Then I hit enter, and the program doesn't exit until I hit enter again several seconds later.

Any idea what's happening here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0