remove pws.

This commit is contained in:
fiatjaf
2021-01-16 19:55:37 -03:00
parent 0be9c408be
commit 63259eb7c3
3 changed files with 3 additions and 10 deletions

View File

@@ -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