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: force ip4 for getLocalIp to resolve mdns issues #105

Merged
merged 2 commits into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion apps/server/src/utilities/network.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class NetworkService implements OnApplicationShutdown {
*/
async getLocalIp(defaultToLocalhost = false): Promise<string | undefined> {
return new Promise<string | undefined>((resolve) => {
const conn = createConnection({ host: 'api.flybywiresim.com', port: 443, timeout: 1000 })
const conn = createConnection({ host: 'api.flybywiresim.com', port: 443, timeout: 1000, family: 4 })
.on('connect', () => {
const { address } = conn.address() as AddressInfo;
// Calling destroy on every event to make sure simbridge can shut down cleanly
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fbw-simbridge",
"version": "0.5.1",
"version": "0.5.2",
"description": "The simbridge server for FBW addons for various tasks the addons themselves can't achieve",
"author": "",
"private": false,
Expand Down
Loading