Commit Graph

6 Commits

Author SHA1 Message Date
Guangcong Luo
160efc9898 Fix crash after failed Net request 2020-07-02 11:25:34 -07:00
Guangcong Luo
713f914d75 Fix Net error behavior
A lot of Net functions returned Promises that would not reliably
resolve/reject if a Net request failed. This fixes it so they should
now all reliably reject on request failure.

(Yes, this fixes the ladder issues and memory leak in Main.)
2020-06-10 16:08:48 -07:00
Guangcong Luo
1e5b5ab465 Update Streams API with pushEnd/writeEnd
Previously, ending a read stream was `stream.push(null)`, and ending a
write stream was `stream.end()`. This was often confusing, and so now,
these are consistently `stream.pushEnd()` and `stream.writeEnd()`.

This refactor already found a bug in which `stream.end()` was used
where `stream.push(null)` should have been.

Also in this refactor: By default, `pushError` ends the stream. You can
pass `true` as the second parameter if the error is recoverable (the
stream shouldn't end).
2020-06-10 16:07:24 -07:00
Guangcong Luo
b53480b364 Fix memory leak in ladders-remote 2020-06-09 18:31:29 -07:00
Guangcong Luo
b99c8db5d2 Fix Net library 2020-06-05 10:38:27 -07:00
Mia
cf42c6269a
Add a library for making HTTP/S requests (#6744) 2020-06-04 11:53:58 -07:00