Created
June 17, 2025 13:55
-
-
Save FauxFaux/a04fcd87bea5da4131e6e29971ec4761 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {createServer} from "node:net"; | |
| async function main() { | |
| createServer(() => {}) | |
| // .listen(0); | |
| console.log('going to hang forever:'); | |
| await new Promise(() => {}); | |
| console.log('finished hanging'); | |
| } | |
| main() | |
| .then(() => console.log('main function completed')) | |
| .catch(err => console.error('error in main:', err)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment