mirror of
https://github.com/4ian/GDevelop.git
synced 2026-10-12 02:01:17 +00:00
Close the game > Dispose Debugger => Close WebSockets
This commit is contained in:
@@ -614,6 +614,8 @@ namespace gdjs {
|
||||
}
|
||||
}
|
||||
|
||||
abstract dispose(): void;
|
||||
|
||||
/**
|
||||
* Should be re-implemented by derived class to send a stringified message object
|
||||
* to the debugger server.
|
||||
|
||||
@@ -8,6 +8,8 @@ namespace gdjs {
|
||||
super(runtimeGame);
|
||||
}
|
||||
|
||||
dispose(): void {}
|
||||
|
||||
protected _sendMessage(message: string) {}
|
||||
}
|
||||
|
||||
|
||||
@@ -86,6 +86,13 @@ namespace gdjs {
|
||||
}
|
||||
|
||||
private hasLoggedError: boolean = false;
|
||||
|
||||
dispose(): void {
|
||||
if (this._ws) {
|
||||
this._ws.close();
|
||||
}
|
||||
}
|
||||
|
||||
protected _sendMessage(message: string) {
|
||||
if (!this._ws) {
|
||||
// The error can be logged only once, since logger.warn will call this function again,
|
||||
|
||||
Reference in New Issue
Block a user