Catch relay connect errors
This commit is contained in:
@ -15,6 +15,7 @@ export class NostrSystem {
|
||||
* @param {string} address
|
||||
*/
|
||||
ConnectToRelay(address, options) {
|
||||
try {
|
||||
if (typeof this.Sockets[address] === "undefined") {
|
||||
let c = new Connection(address, options);
|
||||
for (let s of Object.values(this.Subscriptions)) {
|
||||
@ -22,6 +23,9 @@ export class NostrSystem {
|
||||
}
|
||||
this.Sockets[address] = c;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
AddSubscription(sub) {
|
||||
|
Reference in New Issue
Block a user