bug fixed: connection pool should NOT increase counter when connect fail
parent
28dcc9d099
commit
701bc391bc
3
HISTORY
3
HISTORY
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
Version 1.06 2014-06-24
|
||||
Version 1.06 2014-06-27
|
||||
* update source code from FastDFS V5.02
|
||||
* add function short2buff and buff2short
|
||||
* add object memory pool (fast_mblock.h and fast_mblock.c)
|
||||
|
|
@ -13,6 +13,7 @@ Version 1.06 2014-06-24
|
|||
* #include <stdbool.h> to use C99 bool
|
||||
* add libfastcommon.spec for building RPM
|
||||
* logger can delete old rotated files
|
||||
* bug fixed: connection pool should NOT increase counter when connect fail
|
||||
|
||||
Version 1.05 2012-07-08
|
||||
* update source code from FastDFS V3.09
|
||||
|
|
|
|||
|
|
@ -202,6 +202,10 @@ ConnectionInfo *conn_pool_get_connection(ConnectionPool *cp,
|
|||
cp->connect_timeout);
|
||||
if (*err_no != 0)
|
||||
{
|
||||
pthread_mutex_lock(&cm->lock);
|
||||
cm->total_count--; //rollback
|
||||
pthread_mutex_unlock(&cm->lock);
|
||||
|
||||
free(p);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue