Skip to content

Commit

Permalink
remove debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasstrehle committed Jun 18, 2024
1 parent e1e523a commit a9b9f1e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
2 changes: 0 additions & 2 deletions network/communication-hub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,6 @@ export class CommunicationHubHandler {

// find socket that matches endpoint instance exactly
const socket = this.findMatchingEndpointSocket(endpoint, excludeSocket);
// console.log("getPreferredSocketForEndpoint", socket, endpoint, excludeSocket);

if (socket) return socket;

Expand Down Expand Up @@ -633,7 +632,6 @@ export class CommunicationHubHandler {

const promises = []

// console.log("datexOut", receivers, outGroups);
for (const [socket, endpoints] of outGroups) {
if (!socket) continue;
promises.push(this.sendAddressedBlockToReceivers(data.dxb, endpoints, socket));
Expand Down
9 changes: 1 addition & 8 deletions network/communication-interfaces/window-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@ export class WindowInterfaceSocket extends CommunicationInterfaceSocket {
}

handleReceive = (event: MessageEvent) => {
console.log("Receive", event)
if (event.origin == this.windowOrigin) {
if (event.data instanceof ArrayBuffer) this.receive(event.data)
else if (typeof event.data == "string") this.receive(base64ToArrayBuffer(event.data))
else
this.logger.error("Got an invalid request in window socket", event)
} else {
this.logger.error("Got an invalid origin", event.origin, this.windowOrigin, this.toString(), this.endpoint?.toString())
}
}

Expand All @@ -26,7 +21,6 @@ export class WindowInterfaceSocket extends CommunicationInterfaceSocket {
}

close() {
console.warn("Why are we removing this socket??????", this)
globalThis.removeEventListener('message', this.handleReceive);
}

Expand All @@ -36,8 +30,7 @@ export class WindowInterfaceSocket extends CommunicationInterfaceSocket {
else this.window.postMessage(dxb, this.windowOrigin)
return true;
}
catch (e) {
console.error(e, "window socket");
catch {
return false;
}
}
Expand Down
1 change: 0 additions & 1 deletion runtime/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1773,7 +1773,6 @@ export class Runtime {

// block end
if (current_block && index >= current_block_size) {
console.log("received new block from stream")
this.handleDatexIn(current_block.buffer, full_scope_callback, variables, header_callback, socket)
.catch(e=>console.error("Error handling block stream: ", e))
// reset for next block
Expand Down

0 comments on commit a9b9f1e

Please sign in to comment.