Browse Source

db_cluster: allow permanent inactive connection

- activation time has to be set to 0 (to be possible via rpc commands)
- fix check of activation time based on inactive_interval parameter,
  reported by Juah Heinanen
Daniel-Constantin Mierla 13 năm trước cách đây
mục cha
commit
7139fbd5d8
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      modules_k/db_cluster/dbcl_data.c

+ 3 - 1
modules_k/db_cluster/dbcl_data.c

@@ -132,7 +132,9 @@ int dbcl_valid_con(dbcl_con_t *sc)
 		return 0;
 	if(sc->sinfo->state & DBCL_CON_INACTIVE)
 	{
-		if(sc->sinfo->aticks>0 && sc->sinfo->aticks<get_ticks())
+		if(sc->sinfo->aticks==0)
+			return -1;
+		if(sc->sinfo->aticks>get_ticks())
 			return -1;
 		sc->sinfo->aticks = 0;
 		sc->sinfo->state &= ~DBCL_CON_INACTIVE;