Skip to content

Commit

Permalink
fix: force ip4 for getLocalIp
Browse files Browse the repository at this point in the history
  • Loading branch information
Saschl committed Nov 16, 2023
1 parent d9464f2 commit 24a1615
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 24a1615

Please sign in to comment.