(message: string)
| 231 | const bindClass = classify(opts.host, { bindClass: opts.bindClass }); |
| 232 | if (bindClass !== 'loopback') { |
| 233 | const refusePublicBind = async (message: string): Promise<never> => { |
| 234 | try { |
| 235 | await tokenStore.dispose(); |
| 236 | } catch { |
| 237 | // best-effort cleanup of the token file on boot refusal |
| 238 | } |
| 239 | lockHandle.release(); |
| 240 | throw new Error(message); |
| 241 | }; |
| 242 | if (opts.insecureNoTls !== true) { |
| 243 | await refusePublicBind( |
| 244 | 'Refusing to bind a non-loopback host without TLS. ' + |
no test coverage detected