Fix control socket & event socket (?)
For some reason this commit seems to make the control and event sockets work where previously they would sometimes (but ONLY sometimes) refuse to connect.
このコミットが含まれているのは:
コミット
2fe67815c6
|
@ -1,6 +1,7 @@
|
||||||
# SPDX-FileCopyrightText: 2022 n9k <https://git.076.ne.jp/ninya9k>
|
# SPDX-FileCopyrightText: 2022 n9k <https://git.076.ne.jp/ninya9k>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
|
import asyncio
|
||||||
import json
|
import json
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
|
@ -76,6 +77,10 @@ def create_app(toml_config):
|
||||||
|
|
||||||
@app.before_serving
|
@app.before_serving
|
||||||
async def startup():
|
async def startup():
|
||||||
|
# Create routes and background tasks
|
||||||
|
import anonstream.routes
|
||||||
|
import anonstream.tasks
|
||||||
|
|
||||||
# Start control server
|
# Start control server
|
||||||
if app.config['SOCKET_CONTROL_ENABLED']:
|
if app.config['SOCKET_CONTROL_ENABLED']:
|
||||||
from anonstream.control.server import start_control_server_at
|
from anonstream.control.server import start_control_server_at
|
||||||
|
@ -94,8 +99,4 @@ def create_app(toml_config):
|
||||||
)
|
)
|
||||||
app.add_background_task(start_event_server)
|
app.add_background_task(start_event_server)
|
||||||
|
|
||||||
# Create routes and background tasks
|
|
||||||
import anonstream.routes
|
|
||||||
import anonstream.tasks
|
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
|
読み込み中…
新しいイシューから参照