MCPcopy Create free account
hub / github.com/apache/tvm / onClose

Method onClose

web/src/rpc_server.ts:134–152  ·  view source on GitHub ↗
(_event: CloseEvent)

Source from the content-addressed store, hash-verified

132 }
133
134 private onClose(_event: CloseEvent): void {
135 if (this.inst !== undefined) {
136 this.globalObjects.forEach(obj => {
137 obj.dispose();
138 });
139 this.log(this.inst.runtimeStatsText());
140 this.inst.dispose();
141 }
142 if (this.state === RPCServerState.ReceivePacketHeader) {
143 this.log("Closing the server in clean state");
144 this.log("Automatic reconnecting..");
145 new RPCServer(
146 this.url, this.key, this.getImports, this.logger,
147 this.tensorCacheUrl, this.tensorCacheDevice,
148 this.initProgressCallback, this.asyncOnServerLoad);
149 } else {
150 this.log("Closing the server, final state=" + this.state);
151 }
152 }
153
154 private onOpen(_event: Event): void {
155 // Send the headers

Callers 1

constructorMethod · 0.95

Calls 3

logMethod · 0.95
disposeMethod · 0.45
runtimeStatsTextMethod · 0.45

Tested by

no test coverage detected