-
-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
In PLSAbstractServer >> handleRequest:toClient:
the server treats a request from the client and answers it:
jrpcMessage := self parseJSON: requestself sendData: (self handleJSON: jrpcMessage) toClient: clientSocket.
For example, <jrpc: #initialize> (first request from client) returns ^ PLSInitializeResult new that is send back to the client by handleRequest:toClient:
But several jrpc handlers also directly call sendData:toClient:
<jrpc: #'textDocument/didOpen'>
didOpen: textDocument
...
self sendData: (self convertJRPCJsonableObjectToJSON:
((JRPCNotificationObject method:
...
asJRPCJSON)
toClient: clientOutStream<jrpc: #'textDocument/didClose'><jrpc: #'textDocument/didChange'>
(This case is worse because it may also calldidOpen:)- etc
(they seem to be mostly the ones in the lsp - text synchronisation protocol.
Note that handleJSON: also uses convertJRPCJsonableObjectToJSON: ... asJRPCJSON that we see in the "duplicated" sendData:toClient: calls.
Would be nice to have a clearer definition of who is responsible for sending the answer.
My guess is the handlers should avoid to do it ... ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels