Skip to content

Commit

Permalink
don't consume json body twice
Browse files Browse the repository at this point in the history
  • Loading branch information
egasimus committed Nov 21, 2024
1 parent 1ab7423 commit abeabd2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion control_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function main () {
const response = await fetch(`${NODE_OUT}/pause`)
const responseJson = await response.json()
console.log('🟠 Pause response:', responseJson)
canConnect = (await response.json()).canConnect
canConnect = responseJson.canConnect
await new Promise(resolve=>setTimeout(resolve, 100))
}
})
Expand Down
2 changes: 1 addition & 1 deletion control_out_proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async function run (localHost, controlPort, proxyConfig) {
canConnect = false
}
if (connections.size > 0) {
console.log('Closing', connectionsJustClosed, 'open connection(s)')
console.log('Closing', connections.size, 'open connection(s)')
for (const connection of connections) {
try {
connection.close()
Expand Down

0 comments on commit abeabd2

Please sign in to comment.