fix(ws): make the GeoIP database optional so a fresh clone starts - #44
Open
doopey655 wants to merge 1 commit into
Open
fix(ws): make the GeoIP database optional so a fresh clone starts#44doopey655 wants to merge 1 commit into
doopey655 wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.