Skip to content

Commit abeabd2

Browse files
committed
don't consume json body twice
1 parent 1ab7423 commit abeabd2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

control_node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function main () {
2727
const response = await fetch(`${NODE_OUT}/pause`)
2828
const responseJson = await response.json()
2929
console.log('🟠 Pause response:', responseJson)
30-
canConnect = (await response.json()).canConnect
30+
canConnect = responseJson.canConnect
3131
await new Promise(resolve=>setTimeout(resolve, 100))
3232
}
3333
})

control_out_proxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async function run (localHost, controlPort, proxyConfig) {
4949
canConnect = false
5050
}
5151
if (connections.size > 0) {
52-
console.log('Closing', connectionsJustClosed, 'open connection(s)')
52+
console.log('Closing', connections.size, 'open connection(s)')
5353
for (const connection of connections) {
5454
try {
5555
connection.close()

0 commit comments

Comments
 (0)