File tree Expand file tree Collapse file tree
src/main/java/io/github/easy4j/comfy/mcp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,11 +108,12 @@ public synchronized String connect() {
108108 Process child = null ;
109109 try {
110110 child = builder .start ();
111- process = child ;
112- stdin = new PrintWriter (new OutputStreamWriter (child .getOutputStream (), StandardCharsets .UTF_8 ), true );
111+ final Process connectedChild = child ;
112+ process = connectedChild ;
113+ stdin = new PrintWriter (new OutputStreamWriter (connectedChild .getOutputStream (), StandardCharsets .UTF_8 ), true );
113114
114- stdoutReader = daemon ("comfy-mcp-reader" , () -> readLoop (child ));
115- stderrReader = daemon ("comfy-mcp-stderr" , () -> drainStderr (child ));
115+ stdoutReader = daemon ("comfy-mcp-reader" , () -> readLoop (connectedChild ));
116+ stderrReader = daemon ("comfy-mcp-stderr" , () -> drainStderr (connectedChild ));
116117 stdoutReader .start ();
117118 stderrReader .start ();
118119
You can’t perform that action at this time.
0 commit comments