Skip to content

Commit 70e62d8

Browse files
committed
Review comments
1 parent cd83cb7 commit 70e62d8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

js/http.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ import { close } from "./files";
1515
type HttpHandler = (req: ServerRequest, res: ServerResponse) => void;
1616

1717
export class HttpServer implements Closer {
18-
private closing = false;
18+
private _closing = false;
1919

2020
constructor(readonly rid: number) {
21-
assert(rid >= 2);
21+
assert(rid >= 2); // rid should be after stdout/stderr
2222
}
2323

2424
async serve(handler: HttpHandler): Promise<void> {
25-
while (this.closing === false) {
25+
while (this._closing === false) {
2626
const [req, res] = await httpAccept(this.rid);
2727
handler(req, res);
2828
}
2929
}
3030

3131
close(): void {
32-
this.closing = true;
32+
this._closing = true;
3333
close(this.rid);
3434
}
3535
}

src/http_server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ impl Drop for HttpServer {
3838

3939
impl HttpServer {
4040
pub fn accept(&self) -> impl Future<Item = Transaction, Error = DenoError> {
41-
let (transaction_sender, transaction_reciever) =
41+
let (transaction_sender, transaction_receiver) =
4242
oneshot::channel::<Transaction>();
4343
let tx = self.sender_a.clone();
4444
tx.send(transaction_sender)
4545
.map_err(|e| DenoError::from(e))
46-
.and_then(|_| transaction_reciever.map_err(|e| DenoError::from(e)))
46+
.and_then(|_| transaction_receiver.map_err(|e| DenoError::from(e)))
4747
}
4848
}
4949

0 commit comments

Comments
 (0)