提交 e5813f74 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

make sure the port is not same as orignal

上级 b44f1fa1
languages:
Ruby: false
JavaScript: true
PHP: false
Python: false
exclude_paths:
- "/doc/"
......@@ -187,7 +187,7 @@ class UtilLib {
* nano seconds from node: http://stackoverflow.com/a/18197438/1123955
*/
const [, nanoSeed] = process.hrtime()
const n = nanoSeed % RANGE
const n = 1 + nanoSeed % RANGE // +1 to prevent same port
if (currentPort + n > 65000) {
return currentPort + n - RANGE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册