| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent db8c92f commit 2a53165
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,11 +33,14 @@ const dgram = require('dgram'); | |||
| 33 | 33 | socket.bind(0); | |
| 34 | 34 | socket.on('listening', common.mustCall(() => { | |
| 35 | 35 | // Try to set with an invalid interfaceAddress (wrong address class) | |
| 36 | + // | ||
| 37 | + // This operation succeeds on some platforms, throws `EINVAL` on some | ||
| 38 | + // platforms, and throws `ENOPROTOOPT` on others. This is unpleasant, but | ||
| 39 | + // we should at least test for it. | ||
| 36 | 40 | try { | |
| 37 | 41 | socket.setMulticastInterface('::'); | |
| 38 | - throw new Error('Not detected.'); | ||
| 39 | 42 | } catch (e) { | |
| 40 | - console.error(`setMulticastInterface: wrong family error is: ${e}`); | ||
| 43 | + assert(e.code === 'EINVAL' || e.code === 'ENOPROTOOPT'); | ||
| 41 | 44 | } | |
| 42 | 45 | ||
| 43 | 46 | socket.close(); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments