Skip to content

Commit 450e6b9

Browse files
committed
fix(appserver): use canonical initialized notification
1 parent 780520d commit 450e6b9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/main/java/io/github/easy4j/codex/appserver/CodexAppServerRpc.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public void onOpen(WebSocket socket) {
125125
clientInfo.put("version", "3.0.x");
126126
Map<String, Object> initParams = new java.util.LinkedHashMap<>();
127127
initParams.put("clientInfo", clientInfo);
128-
sendRpc(INIT_REQUEST_ID, "initialize", initParams);
128+
sendRpc(INIT_REQUEST_ID, CodexAppServerProtocol.INITIALIZE, initParams);
129129
}
130130

131131
@Override
@@ -236,7 +236,7 @@ private void handleInitializeSettled() {
236236
// both back-to-back from inside the onText callback.
237237
Map<String, Object> payload = new java.util.LinkedHashMap<>();
238238
payload.put("jsonrpc", "2.0");
239-
payload.put("method", "initialized");
239+
payload.put("method", CodexAppServerProtocol.INITIALIZED);
240240
payload.put("params", java.util.Collections.emptyMap());
241241
socket.sendText(toJson(payload), true).whenComplete((w, error) -> {
242242
if (Objects.nonNull(error)) {

0 commit comments

Comments
 (0)