Skip to content

Commit 6b523cc

Browse files
committed
update
1 parent 81be5e2 commit 6b523cc

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

flaxfile/flaxfile.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ default_server = "local"
2020
host = "0.0.0.0"
2121

2222
# 端口配置 (异步单端口设计)
23-
port = 25555
23+
port = 27555
2424

2525
# 存储目录
2626
storage_dir = "./zmq_streaming_storage"

flaxfile/src/flaxfile/client.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,14 @@ def __init__(
432432
# 忽略旧的 upload_port, download_port, control_port
433433
self.async_client = AsyncFlaxFileClient(server_host, port, password)
434434

435+
# Windows 平台:设置事件循环策略为 Selector(ZMQ 需要)
436+
if sys.platform == 'win32':
437+
try:
438+
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
439+
except AttributeError:
440+
# Python < 3.8 不支持 WindowsSelectorEventLoopPolicy
441+
pass
442+
435443
def connect(self):
436444
"""连接到服务器"""
437445
asyncio.run(self.async_client.connect())

0 commit comments

Comments
 (0)