add another default peer, connect to 2

This commit is contained in:
Martti Malmi 2022-06-21 21:19:28 +03:00
parent 1e08e3fc09
commit 875ea435a6

View File

@ -6,11 +6,11 @@ import Gun from 'gun';
const MAX_PEER_LIST_SIZE = 10; const MAX_PEER_LIST_SIZE = 10;
const ELECTRON_GUN_URL = 'http://localhost:8767/gun'; const ELECTRON_GUN_URL = 'http://localhost:8767/gun';
let maxConnectedPeers = Helpers.isElectron ? 2 : 1; let maxConnectedPeers = 3;
const DEFAULT_PEERS = {}; const DEFAULT_PEERS = {};
DEFAULT_PEERS['https://gun-rs.iris.to/gun'] = {}; DEFAULT_PEERS['https://gun-rs.iris.to/gun'] = {};
// DEFAULT_PEERS['https://gun-us.herokuapp.com/gun'] = {}; // disable for now DEFAULT_PEERS['https://gun-us.herokuapp.com/gun'] = {};
const loc = window.location; const loc = window.location;
const host = loc.host; const host = loc.host;
const is_localhost_but_not_dev = host.startsWith('localhost') && host !== 'localhost:8080'; const is_localhost_but_not_dev = host.startsWith('localhost') && host !== 'localhost:8080';