mirror of
https://github.com/aljazceru/ditto.git
synced 2026-02-21 13:05:50 +01:00
SearchStore: only use the external search if the socket is open
This commit is contained in:
@@ -46,7 +46,7 @@ class SearchStore implements EventStore {
|
||||
this.#debug('REQ', JSON.stringify(filters));
|
||||
const query = filters[0]?.search;
|
||||
|
||||
if (this.#relay) {
|
||||
if (this.#relay && this.#relay.socket.readyState === WebSocket.OPEN) {
|
||||
this.#debug(`Searching for "${query}" at ${this.#relay.socket.url}...`);
|
||||
|
||||
const sub = this.#relay.req(filters, opts);
|
||||
|
||||
Reference in New Issue
Block a user