Skip to content

fix(ws): make the GeoIP database optional so a fresh clone starts - #44

Open
doopey655 wants to merge 1 commit into
GeneralsOnlineDevelopmentTeam:mainfrom
nathan-soul:fix/geoip-optional-db
Open

fix(ws): make the GeoIP database optional so a fresh clone starts#44
doopey655 wants to merge 1 commit into
GeneralsOnlineDevelopmentTeam:mainfrom
nathan-soul:fix/geoip-optional-db

Conversation

@doopey655

Copy link
Copy Markdown

Description

The GeoLite2-City.mmdb is gitignored and absent in a fresh clone, but DatabaseReader was opened in a static initialiser of WebSocketController. A fresh checkout therefore failed static init and the server crashed on startup before a single request could be served.

This makes the database optional: opening it is wrapped in a ry/catch, and when the file is missing the lookup falls back to the existing default coordinates (the same defaults the code already used for a lookup failure).

No behaviour change when the .mmdb is present.

Split out of #43 at the reviewer's request.

The GeoLite2-City.mmdb is gitignored and absent in a fresh clone, but the
reader was opened in a static initialiser, so the WebSocket controller
failed static init and the server would not start. Open it in a try/catch
and fall back to the lookup defaults when the file is missing.
doopey655 added a commit to nathan-soul/Services that referenced this pull request Aug 16, 2026
The GeoIP-optional change was split out into its own PR (GeneralsOnlineDevelopmentTeam#44) at the
reviewer's request; this restores the original non-optional reader here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant