Skip to content
Snippets Groups Projects
Commit 8543d5d2 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

fix(48) Avoid to selct GVA endpoint, in node selection at startup - close #48

parent 6c3b883f
No related branches found
No related tags found
No related merge requests found
...@@ -66,10 +66,8 @@ Peer.prototype.getBMA = function() { ...@@ -66,10 +66,8 @@ Peer.prototype.getBMA = function() {
if (this.bma) return this.bma; if (this.bma) return this.bma;
var bma = null; var bma = null;
var path = null; var path = null;
var bmaRegex = this.regexp.BMA_REGEXP;
var bmasRegex = this.regexp.BMAS_REGEXP;
this.endpoints.forEach(function(ep){ this.endpoints.forEach(function(ep){
var matches = !bma && bmaRegex.exec(ep); var matches = !bma && this.regexp.BMA_REGEXP.exec(ep);
if (matches) { if (matches) {
path = matches[10]; path = matches[10];
if (path && !path.startsWith('/')) path = '/' + path; // Fix path (add starting slash) if (path && !path.startsWith('/')) path = '/' + path; // Fix path (add starting slash)
...@@ -83,7 +81,7 @@ Peer.prototype.getBMA = function() { ...@@ -83,7 +81,7 @@ Peer.prototype.getBMA = function() {
"useBma": true "useBma": true
}; };
} }
matches = !bma && bmasRegex.exec(ep); matches = !bma && this.regexp.BMAS_REGEXP.exec(ep);
if (matches) { if (matches) {
path = matches[10]; path = matches[10];
if (path && !path.startsWith('/')) path = '/' + path; // Fix path (add starting slash) if (path && !path.startsWith('/')) path = '/' + path; // Fix path (add starting slash)
...@@ -190,7 +188,7 @@ Peer.prototype.isWs2p = function() { ...@@ -190,7 +188,7 @@ Peer.prototype.isWs2p = function() {
Peer.prototype.isBma = function() { Peer.prototype.isBma = function() {
var bma = this.bma || this.getBMA(); var bma = this.bma || this.getBMA();
return !bma.useWs2p && !bma.useTor; return !bma.useWs2p && !bma.useTor && !bma.useGva;
}; };
Peer.prototype.hasBma = function() { Peer.prototype.hasBma = function() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment