Skip to content

Commit 3b6430c

Browse files
committed
fix max len error to exception
1 parent e4f6383 commit 3b6430c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

connect_pool_client.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ CPINLINE int CP_CLIENT_SERIALIZE_SEND_MEM(zval *ret_value, int worker_id, int ma
128128
dest.exceed = '0';
129129
php_msgpack_serialize(&dest, ret_value);
130130
if (dest.exceed == '1') {
131-
php_error_docref(NULL TSRMLS_CC, E_ERROR, "data is exceed,increase max_read_len");
131+
zend_throw_exception(NULL, "data is exceed,increase max_read_len", 0 TSRMLS_CC);
132132
} else {
133133
cpWorkerInfo worker_event;
134134
worker_event.len = dest.len;
@@ -489,8 +489,8 @@ PHP_METHOD(redis_connect_pool, __construct)
489489
CP_GET_PID;
490490
MAKE_STD_ZVAL(pool_port);
491491
ZVAL_LONG(pool_port, port);
492-
zend_update_property(pdo_connect_pool_class_entry_ptr, getThis(), ZEND_STRL("cli"), zres TSRMLS_CC);
493-
zend_update_property(pdo_connect_pool_class_entry_ptr, getThis(), ZEND_STRL("pool_port"), pool_port TSRMLS_CC);
492+
zend_update_property(redis_connect_pool_class_entry_ptr, getThis(), ZEND_STRL("cli"), zres TSRMLS_CC);
493+
zend_update_property(redis_connect_pool_class_entry_ptr, getThis(), ZEND_STRL("pool_port"), pool_port TSRMLS_CC);
494494
zval_ptr_dtor(&zres);
495495
zval_ptr_dtor(&pool_port);
496496
}

0 commit comments

Comments
 (0)