-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当设置 dispatch_mode = 2 时,onConnect, onClose 事件与 onReceive 事件不在一个工作进程中。详见截图! #48
Comments
哪个版本? |
swoole-1.6.11-stable |
Ok. 刚才已经找到问题的原因,已修复。 |
1.6.11版本的用户,请手工修改代码,将src/factory/FactoryProcess.c修改的swFactoryProcess_send2worker函数中。 //使用fd取摸来散列
else if (serv->dispatch_mode == SW_DISPATCH_FDMOD)
{
if(data->info.type == SW_EVENT_TCP)
{
pti = data->info.fd % object->worker_num;
}
//udp use remote port
else
{
pti = ((uint16_t) data->info.from_id) % object->worker_num;
}
} 修改为 //使用fd取摸来散列
else if (serv->dispatch_mode == SW_DISPATCH_FDMOD)
{
//udp use remote port
if (data->info.type == SW_EVENT_UDP)
{
pti = ((uint16_t) data->info.from_id) % object->worker_num;
}
else
{
pti = data->info.fd % object->worker_num;
}
} 然后重新编译,安装。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
当设置 dispatch_mode = 2 时,onConnect, onClose 事件与 onReceive 事件不在一个工作进程中。详见截图!
The text was updated successfully, but these errors were encountered: