File tree 2 files changed +10
-8
lines changed 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -479,11 +479,11 @@ async def run(
479
479
# but also make tracing exceptions much easier during testing and when using
480
480
# in-process servers.
481
481
raise_exceptions : bool = False ,
482
- # When True, the server runs in standalone mode for stateless deployments where
482
+ # When True, the server as stateless deployments where
483
483
# clients can perform initialization with any node. The client must still follow
484
484
# the initialization lifecycle, but can do so with any available node
485
485
# rather than requiring initialization for each connection.
486
- standalone_mode : bool = False ,
486
+ stateless : bool = False ,
487
487
):
488
488
async with AsyncExitStack () as stack :
489
489
lifespan_context = await stack .enter_async_context (self .lifespan (self ))
@@ -492,7 +492,7 @@ async def run(
492
492
read_stream ,
493
493
write_stream ,
494
494
initialization_options ,
495
- standalone_mode = standalone_mode ,
495
+ stateless = stateless ,
496
496
)
497
497
)
498
498
Original file line number Diff line number Diff line change @@ -85,15 +85,17 @@ def __init__(
85
85
read_stream : MemoryObjectReceiveStream [types .JSONRPCMessage | Exception ],
86
86
write_stream : MemoryObjectSendStream [types .JSONRPCMessage ],
87
87
init_options : InitializationOptions ,
88
- standalone_mode : bool = False ,
88
+ stateless : bool = False ,
89
89
) -> None :
90
90
super ().__init__ (
91
91
read_stream , write_stream , types .ClientRequest , types .ClientNotification
92
92
)
93
- if standalone_mode :
94
- self ._initialization_state = InitializationState .Initialized
95
- else :
96
- self ._initialization_state = InitializationState .NotInitialized
93
+ self ._initialization_state = (
94
+ InitializationState .Initialized
95
+ if stateless
96
+ else InitializationState .NotInitialized
97
+ )
98
+
97
99
self ._init_options = init_options
98
100
self ._incoming_message_stream_writer , self ._incoming_message_stream_reader = (
99
101
anyio .create_memory_object_stream [ServerRequestResponder ](0 )
You can’t perform that action at this time.
0 commit comments