mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 08:38:50 +00:00
remove pws.
This commit is contained in:
3
relay.js
3
relay.js
@@ -1,4 +1,3 @@
|
||||
import PersistentWebSocket from 'pws'
|
||||
import {verifySignature} from './event'
|
||||
|
||||
export function normalizeRelayURL(url) {
|
||||
@@ -12,7 +11,7 @@ export function normalizeRelayURL(url) {
|
||||
export function relayConnect(url, onEvent, onNotice) {
|
||||
url = normalizeRelayURL(url)
|
||||
|
||||
const ws = new PersistentWebSocket(
|
||||
const ws = new WebSocket(
|
||||
url + (url.indexOf('?') !== -1 ? '&' : '?') + `session=${Math.random()}`,
|
||||
{
|
||||
pingTimeout: 180 * 1000
|
||||
|
||||
Reference in New Issue
Block a user