| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 732d8ca commit 8e1257e
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -114,8 +114,7 @@ function createWorkerProcess(id, env) { | |||
| 114 | 114 | const workerEnv = { ...process.env, ...env, NODE_UNIQUE_ID: `${id}` }; | |
| 115 | 115 | const execArgv = [...cluster.settings.execArgv]; | |
| 116 | 116 | const debugArgRegex = /--inspect(?:-brk|-port)?|--debug-port/; | |
| 117 | - const nodeOptions = process.env.NODE_OPTIONS ? | ||
| 118 | - process.env.NODE_OPTIONS : ''; | ||
| 117 | + const nodeOptions = process.env.NODE_OPTIONS || ''; | ||
| 119 | 118 | ||
| 120 | 119 | if (ArrayPrototypeSome(execArgv, | |
| 121 | 120 | (arg) => RegExpPrototypeTest(debugArgRegex, arg)) || | |
@@ -299,17 +298,17 @@ function queryServer(worker, message) { | |||
| 299 | 298 | address = message.address; | |
| 300 | 299 | } | |
| 301 | 300 | ||
| 302 | - let constructor = RoundRobinHandle; | ||
| 303 | 301 | // UDP is exempt from round-robin connection balancing for what should | |
| 304 | 302 | // be obvious reasons: it's connectionless. There is nothing to send to | |
| 305 | 303 | // the workers except raw datagrams and that's pointless. | |
| 306 | 304 | if (schedulingPolicy !== SCHED_RR || | |
| 307 | 305 | message.addressType === 'udp4' || | |
| 308 | 306 | message.addressType === 'udp6') { | |
| 309 | - constructor = SharedHandle; | ||
| 307 | + handle = new SharedHandle(key, address, message); | ||
| 308 | + } else { | ||
| 309 | + handle = new RoundRobinHandle(key, address, message); | ||
| 310 | 310 | } | |
| 311 | 311 | ||
| 312 | - handle = new constructor(key, address, message); | ||
| 313 | 312 | handles.set(key, handle); | |
| 314 | 313 | } | |
| 315 | 314 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments