pokemon-showdown/lib
Guangcong Luo 8b68cdd736 Fix Streams bug
It turns out 001f98b4f2 was wrong.

When urkerab asked why it `peek` wasn't awaited:

e91c4c5260 (commitcomment-41364837)

The answer was because clearing the buffer after peeking needed to
happen synchronous: if the buffer is written to after peeking but
before the buffer is cleared, that write is lost forever.

This just goes to show, if you do something subtle enough to require
type assertions, you should probably add a comment about what's going
on.

Fixes #7605

This also removes `BattleStream#start()` which is completely useless
API complication. A better implementation would properly forward
crashes between streams (maybe `pipeTo` should do this) but as it
stands, it's not doing anything.
2020-11-01 02:06:24 +00:00
..
crashlogger.ts Update to latest eslint 2020-09-29 15:28:08 -07:00
DASHYCODE.md Clarify Dashycode documentation 2019-07-12 02:04:07 -05:00
dashycode.ts Remove last vestiges of tslint 2020-10-27 22:49:00 +00:00
fs.ts Update to TypeScript 4.0 (#7504) 2020-10-10 14:43:32 -07:00
net.ts Fix crash after failed Net request 2020-07-02 11:25:34 -07:00
process-manager.ts Remove last vestiges of tslint 2020-10-27 22:49:00 +00:00
repl.ts Update to latest eslint 2020-09-29 15:28:08 -07:00
STREAMS.md Introduce chunk readers for ReadStream (#7215) 2020-09-27 08:55:59 -07:00
streams.ts Fix Streams bug 2020-11-01 02:06:24 +00:00
utils.ts Rename Dex.deepClone to Utils.deepClone 2020-08-21 04:24:34 -07:00