small fixes after suggested changes
This commit is contained in:
parent
c053c2e97d
commit
5dba9477ff
2 changed files with 3 additions and 10 deletions
|
|
@ -169,11 +169,7 @@ describe("StreamableHTTPClientTransport", () => {
|
|||
headers: new Headers()
|
||||
});
|
||||
|
||||
// This should not throw an error
|
||||
await transport.terminateSession();
|
||||
|
||||
// The session ID should still be preserved since termination wasn't accepted
|
||||
expect(transport.sessionId).toBe("test-session-id");
|
||||
await expect(transport.terminateSession()).resolves.not.toThrow();
|
||||
});
|
||||
|
||||
it("should handle 404 response when session expires", async () => {
|
||||
|
|
|
|||
|
|
@ -505,10 +505,7 @@ export class StreamableHTTPClientTransport implements Transport {
|
|||
);
|
||||
}
|
||||
|
||||
// If session termination was successful, clear our session ID
|
||||
if (response.ok) {
|
||||
this._sessionId = undefined;
|
||||
}
|
||||
this._sessionId = undefined;
|
||||
} catch (error) {
|
||||
this.onerror?.(error as Error);
|
||||
throw error;
|
||||
|
|
|
|||
Loading…
Reference in a new issue