mirror of
https://github.com/php-win-ext/phpredis.git
synced 2026-03-24 09:02:07 +01:00
Merge branch 'master' of github.com:owlient/phpredis into serializer
This commit is contained in:
6
debian/changelog
vendored
6
debian/changelog
vendored
@@ -1,3 +1,9 @@
|
||||
phpredis (2.0.11) unstable; urgency=low
|
||||
|
||||
* Merged with upstream
|
||||
|
||||
-- Simon Effenberg <se@plista.com> Tue, 30 Nov 2010 09:20:40 +0100
|
||||
|
||||
phpredis (2.0.10-1) unstable; urgency=low
|
||||
|
||||
* Fixed wrong timeout option when setting timeout to lower then 1s.
|
||||
|
||||
@@ -9,13 +9,14 @@
|
||||
PHPAPI int redis_check_eof(RedisSock *redis_sock TSRMLS_DC)
|
||||
{
|
||||
|
||||
int eof = php_stream_eof(redis_sock->stream);
|
||||
int eof = redis_sock->stream == NULL ? 1 : php_stream_eof(redis_sock->stream);
|
||||
int count = 0;
|
||||
while(eof) {
|
||||
if(count++ == 10) { /* too many failures */
|
||||
if(redis_sock->stream) { /* close stream if still here */
|
||||
php_stream_close(redis_sock->stream);
|
||||
redis_sock->stream = NULL;
|
||||
redis_sock->status = REDIS_SOCK_STATUS_FAILED;
|
||||
}
|
||||
zend_throw_exception(redis_exception_ce, "Connection lost", 0 TSRMLS_CC);
|
||||
return -1;
|
||||
|
||||
4
redis.c
4
redis.c
@@ -4011,12 +4011,12 @@ PHP_METHOD(Redis, discard)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
redis_sock->mode = ATOMIC;
|
||||
|
||||
if (redis_sock_get(object, &redis_sock TSRMLS_CC) < 0) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
redis_sock->mode = ATOMIC;
|
||||
|
||||
cmd_len = redis_cmd_format_static(&cmd, "DISCARD", "");
|
||||
|
||||
if (redis_sock_write(redis_sock, cmd, cmd_len) < 0) {
|
||||
|
||||
@@ -83,7 +83,7 @@ redis_pool_free(redis_pool *pool TSRMLS_DC) {
|
||||
rpm = pool->head;
|
||||
while(rpm) {
|
||||
next = rpm->next;
|
||||
redis_sock_disconnect(rpm->redis_sock);
|
||||
redis_sock_disconnect(rpm->redis_sock TSRMLS_CC);
|
||||
efree(rpm->redis_sock);
|
||||
efree(rpm);
|
||||
rpm = next;
|
||||
@@ -195,7 +195,7 @@ PS_OPEN_FUNC(redis)
|
||||
}
|
||||
|
||||
RedisSock *redis_sock = redis_sock_create(url->host, strlen(url->host), url->port, timeout);
|
||||
redis_pool_add(pool, redis_sock, weight);
|
||||
redis_pool_add(pool, redis_sock, weight TSRMLS_CC);
|
||||
|
||||
php_url_free(url);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user