projects
/
pgpool2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1afc643
)
Fix oversight in connection_life_time fix.
author
Tatsuo Ishii
<ishii@sraoss.co.jp>
Sat, 15 Aug 2020 03:37:39 +0000
(12:37 +0900)
committer
Tatsuo Ishii
<ishii@sraoss.co.jp>
Sat, 15 Aug 2020 03:37:39 +0000
(12:37 +0900)
Commit
39eb90fe199d03253b99bec38d85c40f66aa55ab
did not consider the case
when node is down connection struct is NULL. As a result, segfault occurred.
src/protocol/pool_connection_pool.c
patch
|
blob
|
blame
|
history
diff --git
a/src/protocol/pool_connection_pool.c
b/src/protocol/pool_connection_pool.c
index 0c77cbfca3aff2efbf0ff99d2af6a10e0024d756..05954335602f8daf633e07904aa27f9c396687cb 100644
(file)
--- a/
src/protocol/pool_connection_pool.c
+++ b/
src/protocol/pool_connection_pool.c
@@
-350,7
+350,8
@@
pool_connection_pool_timer(POOL_CONNECTION_POOL * backend)
/* Set connection close time */
for (i = 0; i < NUM_BACKENDS; i++)
{
- CONNECTION_SLOT(backend, i)->closetime = time(NULL);
+ if (CONNECTION_SLOT(backend, i))
+ CONNECTION_SLOT(backend, i)->closetime = time(NULL);
}
if (pool_config->connection_life_time == 0)