feta: 定义默认超时时间

This commit is contained in:
pangdahua 2020-10-11 11:05:19 +08:00
parent 5ebc39762d
commit bedd9f1d8a
2 changed files with 3 additions and 1 deletions

View File

@ -75,6 +75,8 @@ static inline void trace(const char *file, int line, const char* function, const
#define WXWORK_SDK_G_NAME "_wecomSDK"
#define WXWORK_SDK_G_NAME_SIZE sizeof(WXWORK_SDK_G_NAME) - 1
// 默认超时时间
#define WXWORK_SDK_DEFAULT_TIMEOUT 30
#endif /* PHP_WXWORK_FINANCE_SDK_H */

View File

@ -326,7 +326,7 @@ PHP_MINIT_FUNCTION(wxwork_finance_sdk)
zend_declare_property_string(wxwork_finance_sdk_ce, "_proxy_host", sizeof("_proxy_host") - 1, "", ZEND_ACC_PRIVATE);
zend_declare_property_string(wxwork_finance_sdk_ce, "_proxy_password", sizeof("_proxy_password") - 1, "", ZEND_ACC_PRIVATE);
// request timeout
zend_declare_property_long(wxwork_finance_sdk_ce, "_timeout", sizeof("_timeout") - 1, 10, ZEND_ACC_PRIVATE);
zend_declare_property_long(wxwork_finance_sdk_ce, "_timeout", sizeof("_timeout") - 1, WXWORK_SDK_DEFAULT_TIMEOUT, ZEND_ACC_PRIVATE);
// declare wecom finance sdk
zend_declare_property_null(wxwork_finance_sdk_ce, WXWORK_SDK_G_NAME, WXWORK_SDK_G_NAME_SIZE, ZEND_ACC_PRIVATE);