关于Channel server

bigman
----------------------- WORKERMAN -----------------------------
Workerman version:3.3.5          PHP version:5.5.4
------------------------ WORKERS -------------------------------
user          worker         listen                    processes status
root          ChannelServer  frame://0.0.0.0:2207       1         
root          websocket      websocket://0.0.0.0:4237   3         

websocket开启3个进程 每个进程启动时 Channel\Client::connect('127.0.0.1', 2207);

Channel\Client::on('broadcast', function ($event_data) use ($worker) {}

为什么 runAll的时候 Channel server会收到6个请求(是websocket进程数的2倍)

int(1)
string(74) "a:2:{s:4:"type";s:9:"subscribe";s:8:"channels";a:1:{i:0;s:9:"broadcast";}}"
int(1)
string(74) "a:2:{s:4:"type";s:9:"subscribe";s:8:"channels";a:1:{i:0;s:9:"broadcast";}}"
int(2)
string(74) "a:2:{s:4:"type";s:9:"subscribe";s:8:"channels";a:1:{i:0;s:9:"broadcast";}}"
int(2)
string(74) "a:2:{s:4:"type";s:9:"subscribe";s:8:"channels";a:1:{i:0;s:9:"broadcast";}}"
int(3)
string(74) "a:2:{s:4:"type";s:9:"subscribe";s:8:"channels";a:1:{i:0;s:9:"broadcast";}}"
int(3)
string(74) "a:2:{s:4:"type";s:9:"subscribe";s:8:"channels";a:1:{i:0;s:9:"broadcast";}}"
3568 1 0
1个回答

bigman

找到原因了 原来 在 client中 onRemoteConnect 中又被调用了 晕
这是bug吗?

  • 暂无评论
年代过于久远,无法发表回答
×
🔝