沒有人反饋過這個問題。 看下是不是改動了workerman或者gatewayWorker源碼。 這個計數(shù)是在 ConnectionInterface::$statistics['connection_count']計數(shù)的,在 TcpConnection 和 AsyncTcpConnection 構(gòu)造函數(shù)里加1,在析構(gòu)函數(shù)里減1。不應(yīng)該出現(xiàn)負(fù)數(shù)的情況,你可以在二者的構(gòu)造函數(shù)和析構(gòu)函數(shù)里打下日志,看下是否有問題。
ConnectionInterface::$statistics['connection_count']