mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-21 16:13:12 +09:00
Host shutdown on duplicate connection (#647)
* Update no-shadow lint rule for enums https://typescript-eslint.io/rules/no-shadow/ * Add websocket close codes enum * Pass close code and reason to event handlers * Shutdown host on duplicate connection * Add connection refusal * Fix lib/link tests * Response to comments * Additional Tests * Removed missed codes in close event
This commit is contained in:
1 parent
c0e631e251
commit
dfc406d025
10 files changed
+210
-35
No files matched your search
@@ -94,9 +94,20 @@ class TestControlConnector extends lib.WebSocketClientConnector {
|
||||
this.sendHandshake(
|
||||
new lib.MessageRegisterControl(
|
||||
new lib.RegisterControlData(
|
||||
this.token,
|
||||
"clusterioctl",
|
||||
"test",
|
||||
this.token, "test",
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class TestHostConnector extends lib.WebSocketClientConnector {
|
||||
register() {
|
||||
this.sendHandshake(
|
||||
new lib.MessageRegisterHost(
|
||||
new lib.RegisterHostData(
|
||||
this.token, "test",
|
||||
this.hostId, {},
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -347,6 +358,7 @@ process.on("exit", () => {
|
||||
module.exports = {
|
||||
TestControl,
|
||||
TestControlConnector,
|
||||
TestHostConnector,
|
||||
slowTest,
|
||||
get,
|
||||
exec,
|
||||
|
||||
Reference in new issue
Block a user