Open viaweb3 opened 7 years ago
Thanks for reporting this. Do you know which command you're sending to corvus when encountering this error? Is your php client multi-threaded? Does the same error message get printed again and again? Need more information to figure out what's going on.
php客户端是单线程短连接,会一直打印这个错误,由于是短连接,应该是socket关闭时的quit
指令。
@pinguo-niulingyun 请问可以稳定复现吗? 求复现方法 (php版本, phpredis版本, 相关代码).
In case someone also has the same problem, it would be great if you can provide the way to reproduce it.
@pinguo-niulingyun
Yeah, the problem exists in function "redis_sock_disconnect", something like this:
`PHPAPI int redis_sock_disconnect(RedisSock *redis_sock TSRMLS_DC) { if (redis_sock == NULL) { return 1; }
redis_sock->dbNumber = 0;
if (redis_sock->stream != NULL) {
if (!redis_sock->persistent) {
redis_sock_write(redis_sock, "*\r\n$4\r\nQUIT\r\n" _NL, sizeof("*\r\n$4\r\nQUIT\r\n" _NL) - 1 TSRMLS_CC);
}`
The original string is simply "QUIT" which is not obey the text protocol. you should fix the source in your redis extension source code and recompile it to your dist.
phpredis