Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit fea0ca73
authored
Dec 13, 2017
by
Sushant
Committed by
GitHub
Dec 13, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(memory-utilization): don't keep bounded reference of connection manager (#8760)
1 parent
b4fd4642
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
lib/dialects/abstract/connection-manager.js
lib/dialects/abstract/connection-manager.js
View file @
fea0ca7
...
...
@@ -43,9 +43,9 @@ class ConnectionManager {
Promise
});
// Save a reference to the bound version so we can remove it with removeListener
this
.
_onProcessExit
=
this
.
_onProcessExit
.
bind
(
this
);
process
.
on
(
'exit'
,
this
.
_onProcessExit
);
process
.
on
(
'beforeExit'
,
()
=>
{
this
.
_onProcessExit
.
call
(
this
);
}
);
this
.
initPools
();
}
...
...
@@ -85,9 +85,6 @@ class ConnectionManager {
* @return {Promise}
*/
close
()
{
// Remove the listener, so all references to this instance can be garbage collected.
process
.
removeListener
(
'exit'
,
this
.
_onProcessExit
);
// Mark close of pool
this
.
getConnection
=
function
getConnection
()
{
return
Promise
.
reject
(
new
Error
(
'ConnectionManager.getConnection was called after the connection manager was closed!'
));
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment