Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Ivan Tymoshenko <[email protected]>
  • Loading branch information
mcollina and ivan-tymoshenko authored Nov 25, 2024
1 parent 4f8527e commit ff47036
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ function createThreadInterceptor (opts) {
const inflights = new Map()
portInflights.set(port, inflights)
port.on('message', (msg) => {
process._rawDebug(workerData?.main || 'main', 'portOnMessage', url, msg)
if (msg.type === 'response') {
const { id, res, err } = msg
const inflight = inflights.get(id)
Expand Down Expand Up @@ -265,15 +264,13 @@ function wire ({ server: newServer, port, ...undiciOpts }) {
server = newServer

if (typeof server === 'string') {
process._rawDebug(workerData?.name || 'main', 'replaceServer', server)
parentPort.postMessage({ type: 'address', address: server, threadId })
} else {
hasInject = typeof server?.inject === 'function'
}
}

function onMessage (msg) {
process._rawDebug(workerData?.name || 'main', msg)
if (msg.type === 'request') {
const { id, opts } = msg

Expand Down

0 comments on commit ff47036

Please sign in to comment.