-
-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
When I run a server, it doesn't listen to connections.
I already described the problem in #330 (comment), but that issue was closed, so I am opening a new one.
Example:
use rustyscript::{Error, Module, Runtime};
fn main() -> Result<(), Error> {
let module = Module::new(
"test.js",
r#"
import * as net from "node:net"
export default function testServer() {
const server = net.createServer()
server.listen(8124, () => {
console.log("server bound")
server.close()
})
}
"#
);
let mut runtime = Runtime::new(Default::default())?;
let handle = runtime.load_module(&module)?;
let () = runtime.call_entrypoint(
&handle,
&(),
)?;
Ok(())
}When I run the same function in Deno, it prints "server bound" and exits, as expected. But with rustyscript it doesn't print "server bound".
This might be related to #360
Metadata
Metadata
Assignees
Labels
No labels