Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: EFB Setting to enable MCDU Server connection to avoid too many connection attempts #6947

Merged
merged 12 commits into from
Mar 23, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Closing all socket connections (even in readyState 0) to avoid unclos…
…ed sockets
  • Loading branch information
frankkopp committed Mar 21, 2022
commit 66a7c66ca6c581c2a78f3b97827edbe628c2751b
Original file line number Diff line number Diff line change
Expand Up @@ -1474,12 +1474,10 @@ class A320_Neo_CDU_MainDisplay extends FMCMainDisplay {
// Therefore, it should be avoided to continuously do connection attempts.
// See above where this method is called for the mitigating solution.
if (this.socket) {
if (this.socket.readyState !== 0) {
// Trying to close a socket in readState == 0 leads to
// an error message ('WebSocket is closed before the connection is established')
// in the console.
this.socket.close();
}
// Trying to close a socket in readState == 0 leads to
// an error message ('WebSocket is closed before the connection is established')
// in the console.
this.socket.close();
this.socket = undefined;
}

Expand Down