more v2-master-server comms work

This commit is contained in:
Eric Froemling 2022-04-14 19:26:18 -07:00
parent ae7c3aad2c
commit 32caf4a3ec
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
15 changed files with 142 additions and 103 deletions

View File

@ -3971,50 +3971,50 @@
"assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e",
"assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34",
"ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a",
"build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/99/7e/a9c63634bc09295b7137efbc5b03",
"build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/09/7a/85d4792454203266127f6b971463",
"build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/74/1d/fc9e33e565475daaac80da5252f0",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/8f/36/a76c81f143ca1a8326fa74252e52",
"build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c5/c7/73a9f555675a1f775ecb438c2dca",
"build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/5d/52/4ab44afb5d906b5ac230595a7db0",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b4/63/6d776da53bfc773393e28f648da1",
"build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f7/ef/e7e331042fa9b2c6ff29a32dab19",
"build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/18/e9/cc68897f6985e36a82a5a9903da0",
"build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/9c/7b/ac1a200be0f37078af0991faca3b",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1b/64/89b0a457b5ac3182f7c0e4d56d32",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cf/4a/adb4c298fba97d7662a54e03e733",
"build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/be/75/d6f9765c8e9ec02656b9369e05ba",
"build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c5/ad/a7b772a315f4e44e584e9b301193",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/27/c8/e750bd63efc9bc9044434a85a36b",
"build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/bc/67/ddebb7f7dc9aec9118c8b94f4770",
"build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/5d/64/bf0bc44efa11f1dc1cebf12d4602",
"build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/f0/85/0999b7aa41ceeec58d5b624d4f8a",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d6/08/5f9ebe3042acd98f8358c3938226",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/87/06/72f03c7c44379aa49f921b00257d",
"build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/98/14/dda7238d3e57474d4e325f8acfec",
"build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/7c/9e/0257ecd6e0427306d4f15ec071b2",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/2c/b9/4a6dea5818a6dbbada49092242c8",
"build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/2c/52/763d351ddf7778dd10a099f1d2d5",
"build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ef/cc/71ff8188172b919a95a28c4ddf49",
"build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/63/c9/585a425482ab0e123edfa1a34bb4",
"build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6a/57/e3cc2d31572937022a658b11da46",
"build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f8/61/d65c5c17d96346202ba033f0ba07",
"build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/eb/56/58eba010c3d8757925cd83473071",
"build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c4/ea/7855552175e44f75ee6fe6081181",
"build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/1e/d6/f3746757eee023903adddc0bbccb",
"build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/1b/f3/f9d3c048edbd746e566cafcf5539",
"build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/52/bd/64a6cfb863ec403aeb05ad7d6255",
"build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d7/53/61de32567dfe1493748ff9758b85",
"build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0b/ec/e0daab5d68dd2892e904e7b16240",
"build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/94/c3/a62f8a2164d81cc61f361ff687cb",
"build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b1/50/311482ff29a7fbe0d7ecee57a9ce",
"build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6b/ae/0611db4ea8ccd933557d79ce6837",
"build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/40/1a/2947e4c51e3e7942c1bebcdd877c",
"build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8e/93/73bdecb88823ec41ff22b3254393",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/c7/6c/76f09157c10d52254e8ba612f481",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/3d/bf/4e956246387aa112aa124ac393e1",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/0d/da/a870975b2a953241af857f4385b8",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/c0/d8/598c01b061d832067c5797a58390",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/14/9a/7f7debd96dfb2255bff2705c93f9",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/87/3e/6d30b82d8b27bae4ed4c087d9fdd",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/cf/f5/1d89bbfd67b7d01de298082ad6f1",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/1c/23/0a72787714d43253658f4d96941c",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c7/6f/1a6c08dd4c291077b8c51be8e417",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/87/15/0814e3b83974405c970dafc74869",
"build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/58/9e/e0de1370317a3fb45174236b43ec",
"build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/54/bb/5285d2bd3f6f9cb2ad858f7ac7d2",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ff/2b/6059bcc6ba3ea9d4c88130e906ab",
"build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c1/4d/ecf4c523d4afbeb598a74aa19027",
"build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/15/e9/86c7cbc1e71db412f3bb4338e7b2",
"build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/dc/fd/69cd2582308fa75400b610702179",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/89/ab/041c9cc32305515f98f4959ac0d7",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/08/fe/a9f1d17d6491b649285e54795097",
"build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/9f/ee/5423526e849bee73084379a982b6",
"build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/de/f7/10d02a4e23f68f394758991ea6bb",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/15/ca/af6b357dc05f4ede6b69102a3438",
"build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ce/ad/4b7f1e4234dd207df2191bc31573",
"build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/89/e7/bddebae8f1238053c424601c2e1b",
"build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8f/e9/0dbdd88e200fad78ce9ca8af72e0",
"build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8a/41/0aa39ae1cf0f1939b3a6f25f61a1",
"build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/18/c7/1f9f11e753dbfd3ce17b1a355b7d",
"build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e5/35/4b65f05089a8dc7552e1d6efeb7e",
"build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5c/3b/8bf5b65f7ba311116ea71c0f157a",
"build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/07/6d/3441c6c39ec55e532ad0e2295e54",
"build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/21/b0/fe3a4950958bcef9b4e7c09ca1d6",
"build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ad/db/5ca0536cef4adad5c20ef8a21c15",
"build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/55/d3/511833367da7546a2fe143e94c48",
"build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5b/64/4536316032cca40227c045c99b8a",
"build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6d/da/bf1b3d173484c6a46022ade973bf",
"build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/11/b3/aa5493d4e7c19daedd17474d89e6",
"build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6e/df/ce8a87922ff11b26579c7fb0021a",
"build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7c/b1/2f659ec3185311272e7f1e395255",
"build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/97/82/4dd06b79621e5574a257b0882648",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/22/61/5634db97f5f1b8d3f306813ac020",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/59/15/81836ef75c25113b691ec13dbfe0",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/8a/c2/362fa12093fe34dab45f9e276fea",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/43/2a/fe49f1ac82e61311edec688aa89f",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/14/2c/2f589a7c80b7e1f094f3b1664850",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/f8/60/56eb47d7850e87dbb70357b84ddd",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/6c/29/c257034a97e0a497a4147dc21744",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/cf/41/6e8e28df35b7e144ccd4acbc2601",
"src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/b3/15/7c6d580b3482870b5b058858624c",
"src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/d3/db/e73d4dcf1280d5f677c3cf8b47c3"
}

View File

@ -735,6 +735,7 @@
<w>erroring</w>
<w>errorsound</w>
<w>errstr</w>
<w>escval</w>
<w>etcpack</w>
<w>etsel</w>
<w>etxt</w>
@ -922,6 +923,7 @@
<w>funtionality</w>
<w>futimens</w>
<w>fval</w>
<w>fvar</w>
<w>fverts</w>
<w>fwefocjwerj</w>
<w>gameactivity</w>
@ -1424,6 +1426,7 @@
<w>maxtries</w>
<w>maxval</w>
<w>maxw</w>
<w>maxwait</w>
<w>maxwidth</w>
<w>mbytecount</w>
<w>mdiv</w>
@ -1453,6 +1456,7 @@
<w>minidom</w>
<w>minigame</w>
<w>minigames</w>
<w>minping</w>
<w>minusbutton</w>
<w>minval</w>
<w>minver</w>
@ -1989,9 +1993,11 @@
<w>regionid</w>
<w>regtp</w>
<w>reimported</w>
<w>relfut</w>
<w>relpath</w>
<w>remainingchecks</w>
<w>remoteapp</w>
<w>rentry</w>
<w>representer</w>
<w>reprlib</w>
<w>reqs</w>
@ -2005,6 +2011,7 @@
<w>respawnable</w>
<w>respawned</w>
<w>respawnicon</w>
<w>responsecount</w>
<w>responsetype</w>
<w>responsetypes</w>
<w>responsetypevar</w>
@ -2439,6 +2446,7 @@
<w>thingie</w>
<w>this'll</w>
<w>thismodule</w>
<w>threadpool</w>
<w>threadtype</w>
<w>throwiness</w>
<w>ticon</w>
@ -2743,8 +2751,10 @@
<w>zipapp</w>
<w>zlib</w>
<w>zlibmodule</w>
<w>zoneid</w>
<w>zoneinfo</w>
<w>zoomtext</w>
<w>zpings</w>
<w>zpos</w>
<w>zval</w>
</words>

View File

@ -119,6 +119,7 @@
<inspection_tool class="RedundantSuppression" enabled="true" level="WARNING" enabled_by_default="true">
<scope name="PyIgnoreProtectedAccess" level="WARNING" enabled="false" />
</inspection_tool>
<inspection_tool class="RegExpSimplifiable" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="SyntaxError" enabled="true" level="ERROR" enabled_by_default="true">
<scope name="PyIgnoreProtectedAccess" level="ERROR" enabled="false" />
</inspection_tool>

View File

@ -1,4 +1,5 @@
### 1.6.12 (20542, 2022-03-25)
### 1.6.12 (20551, 2022-04-14)
- More internal work on V2 master-server communication
### 1.6.11 (20539, 2022-03-23)
- Documentation is now generated using pdoc <https://pdoc.dev>. Thanks Dliwk!! (I'll get it wired up to auto-update to a webpage soon).

View File

@ -678,7 +678,7 @@ pycharm-full: prereqs meta
################################################################################
# Run all tests. (live execution verification)
test: prereqs
test: prereqs meta
@tools/pcommand echo BLU Running all tests...
@tools/pcommand pytest -v tests

View File

@ -25,9 +25,14 @@ class NetworkSubsystem:
def __init__(self) -> None:
# Anyone accessing/modifying region_pings should hold this lock.
self.region_pings_lock = threading.Lock()
self.region_pings: dict[str, float] = {}
# Anyone accessing/modifying zone_pings should hold this lock,
# as it is updated by a background thread.
self.zone_pings_lock = threading.Lock()
# Region IDs mapped to average pings. This will remain empty
# until enough pings have been run to be reasonably certain
# that a nearby server has been pinged.
self.zone_pings: dict[str, float] = {}
# For debugging.
self.v1_test_log: str = ''

View File

@ -809,7 +809,7 @@ class PrivateGatherTab(GatherTab):
{
'type': 'PRIVATE_PARTY_START',
'config': dataclass_to_dict(self._hostingconfig),
'region_pings': ba.app.net.region_pings,
'region_pings': ba.app.net.zone_pings,
'expire_time': time.time() + 20,
},
callback=ba.WeakCall(self._hosting_state_response))

View File

@ -192,18 +192,18 @@ def _run_diagnostics(weakwin: weakref.ref[NetTestingWindow]) -> None:
_print(f'\nContacting V2 master-server ({baseaddr})...')
_print_test_results(lambda: _test_fetch(baseaddr))
# Get V2 nearby region
with ba.app.net.region_pings_lock:
region_pings = copy.deepcopy(ba.app.net.region_pings)
nearest_region = (None if not region_pings else sorted(
region_pings.items(), key=lambda i: i[1])[0])
# Get V2 nearby zone
with ba.app.net.zone_pings_lock:
zone_pings = copy.deepcopy(ba.app.net.zone_pings)
nearest_zone = (None if not zone_pings else sorted(
zone_pings.items(), key=lambda i: i[1])[0])
if nearest_region is not None:
nearstr = f'{nearest_region[0]}: {nearest_region[1]:.0f}ms'
if nearest_zone is not None:
nearstr = f'{nearest_zone[0]}: {nearest_zone[1]:.0f}ms'
else:
nearstr = '-'
_print(f'\nChecking nearest V2 region ping ({nearstr})...')
_print_test_results(lambda: _test_nearby_region_ping(nearest_region))
_print(f'\nChecking nearest V2 zone ping ({nearstr})...')
_print_test_results(lambda: _test_nearby_zone_ping(nearest_zone))
if have_error[0]:
_print('\nDiagnostics complete. Some diagnostics failed.',
@ -284,12 +284,11 @@ def _test_fetch(baseaddr: str) -> None:
raise RuntimeError('Got unexpected response data.')
def _test_nearby_region_ping(
nearest_region: Optional[tuple[str, float]]) -> None:
"""Try to ping nearest v2 region."""
if nearest_region is None:
raise RuntimeError('No nearest region.')
if nearest_region[1] > 500:
def _test_nearby_zone_ping(nearest_zone: Optional[tuple[str, float]]) -> None:
"""Try to ping nearest v2 zone."""
if nearest_zone is None:
raise RuntimeError('No nearest zone.')
if nearest_zone[1] > 500:
raise RuntimeError('Ping too high.')

View File

@ -361,6 +361,7 @@
<w>ericsson's</w>
<w>errname</w>
<w>erroring</w>
<w>escval</w>
<w>etcdec</w>
<w>etcpack</w>
<w>evals</w>
@ -449,6 +450,7 @@
<w>funcname</w>
<w>fval</w>
<w>fvals</w>
<w>fvar</w>
<w>fwefocjwerj</w>
<w>gamecenter</w>
<w>gamedata</w>
@ -693,6 +695,7 @@
<w>mastervers</w>
<w>maximus</w>
<w>maxtries</w>
<w>maxwait</w>
<w>maxwidth</w>
<w>mediump</w>
<w>memalign</w>
@ -708,6 +711,7 @@
<w>mikirog</w>
<w>millisecs</w>
<w>minelem</w>
<w>minping</w>
<w>minsdl</w>
<w>mipmapcount</w>
<w>mipmaps</w>
@ -983,15 +987,18 @@
<w>regtp</w>
<w>rehel</w>
<w>reimported</w>
<w>relfut</w>
<w>reloadmedia</w>
<w>rendererdata</w>
<w>renormalize</w>
<w>rentry</w>
<w>rené</w>
<w>reprfunc</w>
<w>rerase</w>
<w>resends</w>
<w>resetbtn</w>
<w>resetinput</w>
<w>responsecount</w>
<w>responsetypes</w>
<w>responsetypevar</w>
<w>resync</w>
@ -1182,6 +1189,7 @@
<w>theres</w>
<w>thismodule</w>
<w>threadname</w>
<w>threadpool</w>
<w>threadtype</w>
<w>ticon</w>
<w>tiltage</w>
@ -1341,8 +1349,10 @@
<w>zmin</w>
<w>zoffset</w>
<w>zomg</w>
<w>zoneid</w>
<w>zoneinfo</w>
<w>zoomable</w>
<w>zpings</w>
<w>zrot</w>
</words>
</dictionary>

View File

@ -11,6 +11,9 @@
;; Projectile indexing and search will ignore the following
;; (in addition to git-ignored stuff which it ignores by default)
(nil . ((projectile-globally-ignored-directories . ("docs"
"src/external"))))
"src/external"
"assets/src/pylib-android"
"assets/src/pylib-apple"
"assets/src/windows"))))
)

View File

@ -21,7 +21,7 @@
namespace ballistica {
// These are set automatically via script; don't modify them here.
const int kAppBuildNumber = 20542;
const int kAppBuildNumber = 20551;
const char* kAppVersion = "1.6.12";
// Our standalone globals.

View File

@ -223,15 +223,13 @@ class GraphicsServer : public Module {
auto texture_compression_types_are_set() const {
return texture_compression_types_set_;
}
auto set_renderer_context_lost(bool lost) -> auto {
renderer_context_lost_ = lost;
}
auto set_renderer_context_lost(bool lost) { renderer_context_lost_ = lost; }
auto renderer_context_lost() const { return renderer_context_lost_; }
auto fullscreen_enabled() const { return fullscreen_enabled_; }
// This doesn't actually toggle fullscreen. It is used to inform the game
// when fullscreen changes under it.
auto set_fullscreen_enabled(bool fs) -> void { fullscreen_enabled_ = fs; }
auto set_fullscreen_enabled(bool fs) { fullscreen_enabled_ = fs; }
auto VideoResize(float h, float v) -> void;
#if BA_ENABLE_OPENGL

View File

@ -17,7 +17,7 @@ if TYPE_CHECKING:
@dataclass
class ServerNodeEntry:
"""Information about a specific server."""
region: Annotated[str, IOAttrs('r')]
zone: Annotated[str, IOAttrs('r')] # FIXME change to 'z'
address: Annotated[str, IOAttrs('a')]
port: Annotated[int, IOAttrs('p')]

View File

@ -134,3 +134,45 @@ def is_udp_network_error(exc: BaseException) -> bool:
}:
return True
return False
def is_asyncio_streams_network_error(exc: BaseException) -> bool:
"""Is the provided exception a network-related error?
This should be passed an exception which resulted from creating and
using asyncio streams. It should return True for any errors that could
conceivably arise due to unavailable/poor network connections,
firewall/connectivity issues, etc. These issues can often be safely
ignored or presented to the user as general 'connection-lost' events.
"""
import errno
import ssl
if isinstance(exc, (
ConnectionError,
TimeoutError,
EOFError,
)):
return True
# Also some specific errno ones.
if isinstance(exc, OSError):
if exc.errno == 10051: # Windows unreachable network error.
return True
if exc.errno in {
errno.ETIMEDOUT,
errno.EHOSTUNREACH,
errno.ENETUNREACH,
}:
return True
# Am occasionally getting a specific SSL error on shutdown which I
# believe is harmless (APPLICATION_DATA_AFTER_CLOSE_NOTIFY).
# It sounds like it may soon be ignored by Python (as of March 2022).
# Let's still complain, however, if we get any SSL errors besides
# this one. https://bugs.python.org/issue39951
if isinstance(exc, ssl.SSLError):
if 'APPLICATION_DATA_AFTER_CLOSE_NOTIFY' in str(exc):
return True
return False

View File

@ -4,9 +4,7 @@
from __future__ import annotations
import ssl
import time
import errno
import asyncio
import logging
import weakref
@ -15,7 +13,7 @@ from dataclasses import dataclass
from threading import current_thread
from typing import TYPE_CHECKING, Annotated
from efro.error import CommunicationError
from efro.error import CommunicationError, is_asyncio_streams_network_error
from efro.util import assert_never
from efro.dataclassio import (dataclass_to_json, dataclass_from_json,
ioprepped, IOAttrs)
@ -513,38 +511,10 @@ class RPCEndpoint:
def _is_expected_connection_error(cls, exc: Exception) -> bool:
"""Stuff we expect to end our connection in normal circumstances."""
# HMMM; should we move this to efro.error?.. something
# like is_asyncio_streams_network_error()?
if isinstance(exc, (
ConnectionError,
TimeoutError,
EOFError,
_KeepaliveTimeoutError,
)):
if isinstance(exc, _KeepaliveTimeoutError):
return True
# Also some specific errno ones.
if isinstance(exc, OSError):
if exc.errno == 10051: # Windows unreachable network error.
return True
if exc.errno in {
errno.ETIMEDOUT,
errno.EHOSTUNREACH,
errno.ENETUNREACH,
}:
return True
# Am occasionally getting a specific SSL error on shutdown which I
# believe is harmless (APPLICATION_DATA_AFTER_CLOSE_NOTIFY).
# It sounds like it may soon be ignored by Python (as of March 2022).
# Let's still complain, however, if we get any SSL errors besides
# this one. https://bugs.python.org/issue39951
if isinstance(exc, ssl.SSLError):
if 'APPLICATION_DATA_AFTER_CLOSE_NOTIFY' in str(exc):
return True
return False
return is_asyncio_streams_network_error(exc)
def _check_env(self) -> None:
# I was seeing that asyncio stuff wasn't working as expected if