File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -479,11 +479,11 @@ async def run(
479479 # but also make tracing exceptions much easier during testing and when using
480480 # in-process servers.
481481 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
483483 # clients can perform initialization with any node. The client must still follow
484484 # the initialization lifecycle, but can do so with any available node
485485 # rather than requiring initialization for each connection.
486- standalone_mode : bool = False ,
486+ stateless : bool = False ,
487487 ):
488488 async with AsyncExitStack () as stack :
489489 lifespan_context = await stack .enter_async_context (self .lifespan (self ))
@@ -492,7 +492,7 @@ async def run(
492492 read_stream ,
493493 write_stream ,
494494 initialization_options ,
495- standalone_mode = standalone_mode ,
495+ stateless = stateless ,
496496 )
497497 )
498498
Original file line number Diff line number Diff line change @@ -85,15 +85,17 @@ def __init__(
8585 read_stream : MemoryObjectReceiveStream [types .JSONRPCMessage | Exception ],
8686 write_stream : MemoryObjectSendStream [types .JSONRPCMessage ],
8787 init_options : InitializationOptions ,
88- standalone_mode : bool = False ,
88+ stateless : bool = False ,
8989 ) -> None :
9090 super ().__init__ (
9191 read_stream , write_stream , types .ClientRequest , types .ClientNotification
9292 )
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+
9799 self ._init_options = init_options
98100 self ._incoming_message_stream_writer , self ._incoming_message_stream_reader = (
99101 anyio .create_memory_object_stream [ServerRequestResponder ](0 )
You can’t perform that action at this time.
0 commit comments