fastmcp 4.22.7 → 4.22.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -996,6 +996,9 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
996
996
  break;
997
997
  }
998
998
  await delay(retryDelay);
999
+ if (this.#connectionState === "closed") {
1000
+ return;
1001
+ }
999
1002
  }
1000
1003
  if (!this.#clientCapabilities) {
1001
1004
  this.#logger.warn(
@@ -1728,7 +1731,15 @@ function joinPaths(basePath, path) {
1728
1731
  return `${basePath}${normalizePath(path)}`;
1729
1732
  }
1730
1733
  function matchUriTemplate(template, uri) {
1731
- const match = template.fromUri(uri);
1734
+ let match;
1735
+ try {
1736
+ match = template.fromUri(uri);
1737
+ } catch (error) {
1738
+ if (error instanceof URIError) {
1739
+ return void 0;
1740
+ }
1741
+ throw error;
1742
+ }
1732
1743
  if (!match) {
1733
1744
  return void 0;
1734
1745
  }
@@ -3123,4 +3134,4 @@ export {
3123
3134
  FastMCPSession,
3124
3135
  FastMCP
3125
3136
  };
3126
- //# sourceMappingURL=chunk-NI4JFIL4.js.map
3137
+ //# sourceMappingURL=chunk-76QWMCYJ.js.map