blinksocks / blinksocks

A framework for building composable proxy protocol stack.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

server crash in h2+caddy config

bash99 opened this issue · comments

  • I'm submitting a...
  • [*] bug report
  • What is the current behavior?
    server crashed

  • If the current behavior is a bug, please provide the steps to reproduce
    config with h2+caddy as examples
    use curl download 100mb file from cachefly use proxy, and ctrl+c to stop curl before download complete.

  • What is the expected behavior?
    server close the error connection asap

  • What is the motivation / use case for changing the behavior?

  • Please tell us about your environment:

  • blinksocks version: [3.3.3]
  • Node.js version: [10.x]
  • npm version: [6.x]
  • os: [debian 9]
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix)
    server log
events.js:167
      throw er; // Unhandled 'error' event
      ^

Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
    at doWrite (_stream_writable.js:406:19)
    at clearBuffer (_stream_writable.js:517:5)
    at onwrite (_stream_writable.js:465:7)
    at WriteWrap.afterDoStreamWrite [as oncomplete] (internal/http2/core.js:1449:10)
Emitted 'error' event at:
    at onwriteError (_stream_writable.js:425:12)
    at onwrite (_stream_writable.js:456:5)
    at doWrite (_stream_writable.js:406:11)
    at clearBuffer (_stream_writable.js:517:5)
    at onwrite (_stream_writable.js:465:7)
    at WriteWrap.afterDoStreamWrite [as oncomplete] (internal/http2/core.js:1449:10)

Can you install the latest build and check again?

$ npm i -g https://github.com/blinksocks/blinksocks-nightly-releases/raw/master/v3.3.4-20180702071427-d9050ef.tgz

Have you also experienced a large amount memory usage when download a large file via websocket or http2? This will probably be fixed in the next release, please stay tuned.

@micooz yes, last build fix crash problem.
And blinksocks use 167M memory after that download (even cancelled on curl side)

Fixed in v3.3.4, thanks for your participation.