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

use ephemeral port range

上级 b5c902e3
......@@ -91,10 +91,16 @@ function guid() {
*
* @param port is just a suggestion.
* there's no grantuee for the number
*
* The IANA suggested ephemeral port range.
* @see http://en.wikipedia.org/wiki/Ephemeral_ports
*
* const DEFAULT_IANA_RANGE = {min: 49152, max: 65535}
*
*/
function getPort(port) {
log.verbose('UtilLib', 'getPort(%d)', port)
let tryPort = nextPort(port || 8788)
let tryPort = nextPort(port || 38788)
return new Promise((resolve, reject) => {
// https://gist.github.com/mikeal/1840641
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册