Skip to content

Commit a537bea

Browse files
committed
Iterate array rather than for/in
1 parent 74c401f commit a537bea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Adapter/api/mynode.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@ exports.getOpenSessionFactories = function() {
115115

116116
exports.closeAllOpenSessionFactories = function() {
117117
var openFactories = exports.getOpenSessionFactories();
118-
for (factory in openFactories) {
119-
factory.close();
118+
while(openFactories[0]) {
119+
openFactories[0].close();
120+
openFactories.shift();
120121
}
121122
};
122123

0 commit comments

Comments
 (0)