mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
With autoUnref set to true (default: false), the Socket.IO client will
allow the program to exit if there is no other active timer/socket in
the event system.
```js
const socket = io({
autoUnref: true
});
```
Note: this option only applies to Node.js clients.
Related: https://github.com/socketio/socket.io-client/issues/1446
15 lines
290 B
JavaScript
15 lines
290 B
JavaScript
const { browser } = require("./support/env");
|
|
|
|
// whitelist some globals to avoid warnings
|
|
if (browser) {
|
|
window.mocha.globals(["___eio", "eio_iframe_*"]);
|
|
} else {
|
|
require("./node.ts");
|
|
}
|
|
|
|
require("./url.ts");
|
|
|
|
// browser only tests
|
|
require("./connection.ts");
|
|
require("./socket.ts");
|