Skip to content

Commit

Permalink
Fix bug in ObjectAdapterFactory.destroy - #2992
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone committed Oct 28, 2024
1 parent c23ad29 commit 18429bd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion js/src/Ice/ObjectAdapterFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ export class ObjectAdapterFactory {
}

destroy() {
this._adapters.forEach(adapter => adapter.destroy());
const adapters = this._adapters.slice();
for (const adapter of adapters) {
// ObjectAdapter.destroy() will remove the adapter from the list of adapters
// by calling removeObjectAdapter
adapter.destroy();
}
}

createObjectAdapter(name, router, promise) {
Expand Down

0 comments on commit 18429bd

Please sign in to comment.