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 940f8fb6
authored
Oct 27, 2015
by
Simon Paris
Committed by
Jan Aagaard Meier
Nov 05, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug causing all connection attempts to fail if the first connection attempt failed
1 parent
ae60c4ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
lib/dialects/abstract/connection-manager.js
lib/dialects/abstract/connection-manager.js
View file @
940f8fb
...
@@ -18,6 +18,7 @@ ConnectionManager = function(dialect, sequelize) {
...
@@ -18,6 +18,7 @@ ConnectionManager = function(dialect, sequelize) {
this
.
sequelize
=
sequelize
;
this
.
sequelize
=
sequelize
;
this
.
config
=
config
;
this
.
config
=
config
;
this
.
dialect
=
dialect
;
this
.
dialect
=
dialect
;
this
.
versionPromise
=
null
;
if
(
config
.
pool
)
{
if
(
config
.
pool
)
{
config
.
pool
=
_
.
clone
(
config
.
pool
);
// Make sure we don't modify the existing config object (user might re-use it)
config
.
pool
=
_
.
clone
(
config
.
pool
);
// Make sure we don't modify the existing config object (user might re-use it)
...
@@ -199,10 +200,13 @@ ConnectionManager.prototype.getConnection = function(options) {
...
@@ -199,10 +200,13 @@ ConnectionManager.prototype.getConnection = function(options) {
return
self
.
sequelize
.
databaseVersion
(
_options
).
then
(
function
(
version
)
{
return
self
.
sequelize
.
databaseVersion
(
_options
).
then
(
function
(
version
)
{
self
.
sequelize
.
options
.
databaseVersion
=
semver
.
valid
(
version
)
?
version
:
self
.
defaultVersion
;
self
.
sequelize
.
options
.
databaseVersion
=
semver
.
valid
(
version
)
?
version
:
self
.
defaultVersion
;
self
.
versionPromise
=
undefined
;
self
.
versionPromise
=
null
;
self
.
$disconnect
(
connection
);
self
.
$disconnect
(
connection
);
});
});
}).
catch
(
function
(
err
)
{
self
.
versionPromise
=
null
;
throw
err
;
});
});
}
}
}
else
{
}
else
{
...
...
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