Skip to content

Commit 9e4d532

Browse files
committed
Update README and SDKClient to improve instructions and ensure proper shutdown
1 parent 3cb33e5 commit 9e4d532

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

04-PracticalSamples/calculator/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export GITHUB_TOKEN=your_github_token_here
250250
Start the server:
251251
```bash
252252
cd 04-PracticalSamples/calculator
253-
mvn spring-boot:run
253+
mvn clean spring-boot:run
254254
```
255255

256256
The server will start on `http://localhost:8080`. You should see:

04-PracticalSamples/calculator/src/test/java/com/microsoft/mcp/sample/client/SDKClient.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,14 @@ public void run() {
9696

9797
// Clean up the connection
9898
client.closeGracefully();
99+
100+
// Give threads time to shut down properly before exiting
101+
try {
102+
Thread.sleep(100);
103+
} catch (InterruptedException e) {
104+
Thread.currentThread().interrupt();
105+
}
106+
107+
System.exit(0);
99108
}
100109
}

0 commit comments

Comments
 (0)