Changeset - cdfd2901918a
[Not reviewed]
default
0 4 0
drewp@bigasterisk.com - 20 months ago 2023-06-01 21:21:20
drewp@bigasterisk.com
logging
4 files changed with 9 insertions and 6 deletions:
0 comments (0 inline, 0 general)
light9/web/RdfDbChannel.ts
Show inline comments
 
@@ -57,9 +57,9 @@ export class RdfDbChannel {
 
    return true;
 
  }
 

	
 
  disconnect() {
 
  disconnect(why:string) {
 
    // will be followed by an autoconnect
 
    log("disconnect requested");
 
    log("disconnect requested:", why);
 
    if (this.ws !== undefined) {
 
      const closeHandler = this.ws.onclose?.bind(this.ws);
 
      if (!closeHandler) {
 
@@ -123,7 +123,7 @@ export class RdfDbChannel {
 

	
 
  private onWsError(e: Event) {
 
    log("ws error", e);
 
    this.disconnect();
 
    this.disconnect("ws error");
 
    this.updateStatus();
 
  }
 

	
light9/web/SyncedGraph.ts
Show inline comments
 
@@ -38,7 +38,7 @@ export class SyncedGraph {
 
    this.autoDeps = new AutoDependencies(this);
 
    this.autoDeps.graphError.subscribe((e) => {
 
      log("graph learned of error - reconnecting", e);
 
      this.client.disconnect();
 
      this.client.disconnect("graph error");
 
    });
 
    this.clearGraph();
 

	
light9/web/patch.ts
Show inline comments
 
@@ -77,6 +77,9 @@ export class Patch {
 
  }
 

	
 
  dump(): string {
 
    if (this.dels.size + this.adds.size > 20) {
 
      return this.summary();
 
    }
 
    const lines: string[] = [];
 
    const s = (term: N3.Term): string => {
 
      if (term.termType == "Literal") return term.value;
light9/web/rdfdbclient.ts
Show inline comments
 
@@ -44,8 +44,8 @@ export class RdfDbClient {
 
    this._continueSending();
 
  }
 

	
 
  disconnect() {
 
    this.channel.disconnect();
 
  disconnect(why:string) {
 
    this.channel.disconnect(why);
 
  }
 

	
 
  async _continueSending() {
0 comments (0 inline, 0 general)