Skip to content

Commit d066c97

Browse files
committed
fixes
1 parent a1fcc68 commit d066c97

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

www/docs/pages/transports/http.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ func main() {
267267
}
268268

269269
// Add middleware
270-
setupHTTPMiddleware(s)
270+
addHTTPMiddleware(s)
271271

272272
// Add comprehensive tools
273273
addCRUDTools(s)

www/docs/pages/transports/inprocess.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,18 @@ func handleProcessData(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallT
146146
}), nil
147147
}
148148

149-
var memoryCache = make(map[string]interface{})
149+
var (
150+
memoryCache = make(map[string]interface{})
151+
cacheMutex sync.RWMutex
152+
)
150153

151154
func handleMemoryCache(ctx context.Context, req mcp.ReadResourceRequest) (*mcp.ReadResourceResult, error) {
152155
key := extractKeyFromURI(req.Params.URI)
153156

157+
cacheMutex.RLock()
154158
value, exists := memoryCache[key]
159+
cacheMutex.RUnlock()
160+
155161
if !exists {
156162
return nil, fmt.Errorf("key not found: %s", key)
157163
}

0 commit comments

Comments
 (0)