Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
27ca133d
Commit
27ca133d
authored
May 14, 2014
by
antirez
Browse files
cluster.tcl: fix redis links leak in refresh_nodes_map.
parent
cdf2271c
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/support/cluster.tcl
View file @
27ca133d
...
...
@@ -64,7 +64,6 @@ proc ::redis_cluster::__method__refresh_nodes_map {id} {
set r
[
redis $start_host $start_port
]
set nodes_descr
[
$r
cluster nodes
]
$r close
puts $e
}
e
]}
{
if
{
$r
ne
{}}
{
catch
{
$r
close
}}
incr idx
...
...
@@ -123,6 +122,13 @@ proc ::redis_cluster::__method__refresh_nodes_map {id} {
lappend ::redis_cluster::startup_nodes
(
$id
)
$addr
}
# Close all the existing links in the old nodes map, and set the new
# map as current.
foreach n $::redis_cluster::nodes
(
$id
)
{
catch
{
[
dict get $n link
]
close
}
}
set ::redis_cluster::nodes
(
$id
)
$nodes
# Populates the slots -> nodes map.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment