From 8600f43171581509fda3cc9ec225edc2c58d4c42 Mon Sep 17 00:00:00 2001 From: Angus ZENG Date: Wed, 6 Dec 2023 20:19:40 +0800 Subject: [PATCH] (client): fixed ECONNRESET error when using http/https client --- CHANGES.md | 4 ++ package-lock.json | 4 +- package.json | 2 +- src/benchmarks/Decoder.ts | 2 +- src/benchmarks/Encoder.ts | 2 +- src/benchmarks/Http/API.ts | 2 +- src/benchmarks/Http/Client.ts | 2 +- src/benchmarks/Http/Server.ts | 2 +- src/benchmarks/TCP/API.ts | 2 +- src/benchmarks/TCP/Client.ts | 2 +- src/benchmarks/TCP/Server.ts | 2 +- src/examples/Http.ts | 57 ++++++++++++++++++++++++++- src/examples/Https.ts | 4 +- src/examples/TCP.ts | 2 +- src/lib/Client/BuiltInRIDGenerator.ts | 2 +- src/lib/Client/Common.ts | 2 +- src/lib/Client/Errors.ts | 2 +- src/lib/Client/HttpClient.ts | 53 +++++++++++++++++++++---- src/lib/Client/HttpsClient.ts | 53 +++++++++++++++++++++---- src/lib/Client/TCPClient.ts | 2 +- src/lib/Client/TLSClient.ts | 2 +- src/lib/Client/index.ts | 2 +- src/lib/Common/API.ts | 2 +- src/lib/Common/Encoding.ts | 2 +- src/lib/Common/Request.ts | 2 +- src/lib/Common/Response.ts | 2 +- src/lib/Common/index.ts | 2 +- src/lib/Encoder/Decoder.ts | 2 +- src/lib/Encoder/Encoder.ts | 2 +- src/lib/Encoder/Errors.ts | 2 +- src/lib/Errors.ts | 2 +- src/lib/Server/Common/Gateway.ts | 2 +- src/lib/Server/Common/Request.ts | 2 +- src/lib/Server/Common/Router.ts | 2 +- src/lib/Server/Common/Server.ts | 2 +- src/lib/Server/Common/index.ts | 2 +- src/lib/Server/Errors.ts | 2 +- src/lib/Server/Gateways/Http.ts | 2 +- src/lib/Server/Gateways/TCP.ts | 2 +- src/lib/Server/Server.ts | 2 +- src/lib/Server/SimpleRouter.ts | 2 +- src/lib/Server/index.ts | 2 +- src/lib/index.ts | 2 +- 43 files changed, 190 insertions(+), 59 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 8a32d02..9d3a35f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changes Logs +## v0.4.8 + +- fix(client): fixed `ECONNRESET` error when using `http/https` client. + ## v0.4.7 - fix(server): refuse malformed request body. diff --git a/package-lock.json b/package-lock.json index 0b8eb89..063663c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@litert/televoke", - "version": "0.4.7", + "version": "0.4.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@litert/televoke", - "version": "0.4.7", + "version": "0.4.8", "license": "Apache-2.0", "dependencies": { "@litert/observable": "^0.3.0" diff --git a/package.json b/package.json index 32f4e2b..0c20d35 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@litert/televoke", - "version": "0.4.7", + "version": "0.4.8", "description": "A simple RPC service framework.", "main": "lib/index.js", "scripts": { diff --git a/src/benchmarks/Decoder.ts b/src/benchmarks/Decoder.ts index b339322..690deca 100644 --- a/src/benchmarks/Decoder.ts +++ b/src/benchmarks/Decoder.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/benchmarks/Encoder.ts b/src/benchmarks/Encoder.ts index a93d062..022f083 100644 --- a/src/benchmarks/Encoder.ts +++ b/src/benchmarks/Encoder.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/benchmarks/Http/API.ts b/src/benchmarks/Http/API.ts index 7276b78..e0a8ca6 100644 --- a/src/benchmarks/Http/API.ts +++ b/src/benchmarks/Http/API.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/benchmarks/Http/Client.ts b/src/benchmarks/Http/Client.ts index aeb1705..8a62570 100644 --- a/src/benchmarks/Http/Client.ts +++ b/src/benchmarks/Http/Client.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/benchmarks/Http/Server.ts b/src/benchmarks/Http/Server.ts index b023cc7..99b94b2 100644 --- a/src/benchmarks/Http/Server.ts +++ b/src/benchmarks/Http/Server.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/benchmarks/TCP/API.ts b/src/benchmarks/TCP/API.ts index 50e76a2..ecfff8a 100644 --- a/src/benchmarks/TCP/API.ts +++ b/src/benchmarks/TCP/API.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/benchmarks/TCP/Client.ts b/src/benchmarks/TCP/Client.ts index 24c0795..d28a940 100644 --- a/src/benchmarks/TCP/Client.ts +++ b/src/benchmarks/TCP/Client.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/benchmarks/TCP/Server.ts b/src/benchmarks/TCP/Server.ts index 5c75382..db7c324 100644 --- a/src/benchmarks/TCP/Server.ts +++ b/src/benchmarks/TCP/Server.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/examples/Http.ts b/src/examples/Http.ts index aedb06c..f3317c1 100644 --- a/src/examples/Http.ts +++ b/src/examples/Http.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -93,7 +93,7 @@ interface IGa extends $Televoke.IServiceAPIs { const client = $Televoke.createHttpClient({ host: '127.0.0.1', port: 8899, - ridGenerator: $Televoke.createIncreasementRIDGenerator(0) + ridGenerator: $Televoke.createIncrementRIDGenerator(0) }); server.setRouter(router); @@ -128,6 +128,59 @@ interface IGa extends $Televoke.IServiceAPIs { console.log(await requestByHttp('PUT', '{"fffff":', {})); + try { + + await client.invoke('hi', {'name': 'Mick'}); + const T = Date.now(); + + while (1) { + + if (T < Date.now() - 10000) { + + break; + } + } + + console.log(await client.invoke('hi', {'name': 'Mick'})); + + console.info('Failed: Should got ECONNRESET here.'); + } + catch (e) { + + console.error('PASSED: Got ECONNRESET here when CPU stuck for 10s'); + console.error(e); + } + + const client2 = $Televoke.createHttpClient({ + host: '127.0.0.1', + port: 8899, + ridGenerator: $Televoke.createIncrementRIDGenerator(0), + retryConnReset: true, + }); + + try { + + await client2.invoke('hi', {'name': 'Mick'}); + const T = Date.now(); + + while (1) { + + if (T < Date.now() - 10000) { + + break; + } + } + + console.log(await client2.invoke('hi', {'name': 'Mick'})); + + console.info('PASSED: No ECONNRESET here even if CPU stuck for 10s'); + } + catch (e) { + + console.error('Failed: Still got error here.'); + console.error(e); + } + await server.close(); })().catch(console.error); diff --git a/src/examples/Https.ts b/src/examples/Https.ts index 4d0b056..db962be 100644 --- a/src/examples/Https.ts +++ b/src/examples/Https.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,7 +36,7 @@ interface IGa extends $Televoke.IServiceAPIs { const client = $Televoke.createHttpsClient({ host: 'examples.org', - ridGenerator: $Televoke.createIncreasementRIDGenerator(0), + ridGenerator: $Televoke.createIncrementRIDGenerator(0), path: '/path/to/rpc/entry' }); diff --git a/src/examples/TCP.ts b/src/examples/TCP.ts index 0d362d6..a23ca48 100644 --- a/src/examples/TCP.ts +++ b/src/examples/TCP.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Client/BuiltInRIDGenerator.ts b/src/lib/Client/BuiltInRIDGenerator.ts index 36be2a2..54edae9 100644 --- a/src/lib/Client/BuiltInRIDGenerator.ts +++ b/src/lib/Client/BuiltInRIDGenerator.ts @@ -1,6 +1,6 @@ import * as C from './Common'; -export function createIncreasementRIDGenerator(base: number): C.IRIDGenerator { +export function createIncrementRIDGenerator(base: number): C.IRIDGenerator { return () => base++; } diff --git a/src/lib/Client/Common.ts b/src/lib/Client/Common.ts index 8b9f9da..3cbdf66 100644 --- a/src/lib/Client/Common.ts +++ b/src/lib/Client/Common.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Client/Errors.ts b/src/lib/Client/Errors.ts index 45187c3..8727124 100644 --- a/src/lib/Client/Errors.ts +++ b/src/lib/Client/Errors.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Client/HttpClient.ts b/src/lib/Client/HttpClient.ts index caf48f2..6761d16 100644 --- a/src/lib/Client/HttpClient.ts +++ b/src/lib/Client/HttpClient.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,8 @@ class HttpClient extends Events.EventEmitter implem private readonly _ridGenerator: C.IRIDGenerator, private readonly _path: string = '/', private readonly _timeout: number = 30000, - private readonly _apiNameWrapper?: (name: string) => string + private readonly _apiNameWrapper?: (name: string) => string, + private readonly _retryConnReset?: boolean, ) { super(); @@ -41,18 +42,46 @@ class HttpClient extends Events.EventEmitter implem this._agent = new $Http.Agent({ maxSockets: 0, keepAlive: true, - keepAliveMsecs: 30000 + keepAliveMsecs: this._timeout }); } - public invoke(api: any, ...args: any[]): Promise { + public async invoke(api: any, ...args: any[]): Promise { - return this._call(api, false, args); + try { + + return await this._call(api, false, args); + } + catch (e) { + + if (this._retryConnReset && (e as any)?.code === 'ECONNRESET') { + + return this._call(api, false, args); + } + else { + + throw e; + } + } } - public call(api: any, ...args: any[]): Promise { + public async call(api: any, ...args: any[]): Promise { + + try { + + return await this._call(api, true, args); + } + catch (e) { - return this._call(api, true, args); + if (this._retryConnReset && (e as any)?.code === 'ECONNRESET') { + + return this._call(api, true, args); + } + else { + + throw e; + } + } } private _call(api: any, returnRaw: boolean, args: any[]): Promise { @@ -217,6 +246,13 @@ export interface IHttpClientOptions { timeout?: number; apiNameWrapper?: (name: string) => string; + + /** + * Whether to retry when the connection is reset. + * + * @default false + */ + retryConnReset?: boolean; } export function createHttpClient(opts: IHttpClientOptions): C.IClient { @@ -227,6 +263,7 @@ export function createHttpClient(opts: IHttpClient opts.ridGenerator, opts.path, opts.timeout, - opts.apiNameWrapper + opts.apiNameWrapper, + opts.retryConnReset, ); } diff --git a/src/lib/Client/HttpsClient.ts b/src/lib/Client/HttpsClient.ts index 306fd04..ac6cc7c 100644 --- a/src/lib/Client/HttpsClient.ts +++ b/src/lib/Client/HttpsClient.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,7 +34,8 @@ class HttpsClient extends Events.EventEmitter imple private readonly _path: string = '', private readonly _timeout: number = 30000, private readonly _apiNameWrapper?: (name: string) => string, - tlsAgentOptions?: $Https.AgentOptions + tlsAgentOptions?: $Https.AgentOptions, + private readonly _retryConnReset?: boolean, ) { super(); @@ -42,20 +43,48 @@ class HttpsClient extends Events.EventEmitter imple this._agent = new $Https.Agent({ maxSockets: 0, keepAlive: true, - keepAliveMsecs: 30000, + keepAliveMsecs: this._timeout, // servername: _host, ...tlsAgentOptions }); } - public invoke(api: any, ...args: any[]): Promise { + public async invoke(api: any, ...args: any[]): Promise { - return this._call(api, false, args); + try { + + return await this._call(api, false, args); + } + catch (e) { + + if (this._retryConnReset && (e as any)?.code === 'ECONNRESET') { + + return this._call(api, false, args); + } + else { + + throw e; + } + } } - public call(api: any, ...args: any[]): Promise { + public async call(api: any, ...args: any[]): Promise { + + try { + + return await this._call(api, true, args); + } + catch (e) { - return this._call(api, true, args); + if (this._retryConnReset && (e as any)?.code === 'ECONNRESET') { + + return this._call(api, true, args); + } + else { + + throw e; + } + } } private _call(api: any, returnRaw: boolean, args: any[]): Promise { @@ -222,6 +251,13 @@ export interface IHttpsClientOptions { apiNameWrapper?: (name: string) => string; tlsAgentOptions?: $Https.AgentOptions; + + /** + * Whether to retry when the connection is reset. + * + * @default false + */ + retryConnReset?: boolean; } export function createHttpsClient(opts: IHttpsClientOptions): C.IClient { @@ -233,6 +269,7 @@ export function createHttpsClient(opts: IHttpsClie opts.path, opts.timeout, opts.apiNameWrapper, - opts.tlsAgentOptions + opts.tlsAgentOptions, + opts.retryConnReset, ); } diff --git a/src/lib/Client/TCPClient.ts b/src/lib/Client/TCPClient.ts index b58430c..8f4b0e7 100644 --- a/src/lib/Client/TCPClient.ts +++ b/src/lib/Client/TCPClient.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Client/TLSClient.ts b/src/lib/Client/TLSClient.ts index d96b27d..0673cbe 100644 --- a/src/lib/Client/TLSClient.ts +++ b/src/lib/Client/TLSClient.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Client/index.ts b/src/lib/Client/index.ts index 8f931ca..20e6247 100644 --- a/src/lib/Client/index.ts +++ b/src/lib/Client/index.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Common/API.ts b/src/lib/Common/API.ts index 29a60f6..66c153e 100644 --- a/src/lib/Common/API.ts +++ b/src/lib/Common/API.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Common/Encoding.ts b/src/lib/Common/Encoding.ts index 0bbdbf8..0a24347 100644 --- a/src/lib/Common/Encoding.ts +++ b/src/lib/Common/Encoding.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Common/Request.ts b/src/lib/Common/Request.ts index bb48660..26ff385 100644 --- a/src/lib/Common/Request.ts +++ b/src/lib/Common/Request.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Common/Response.ts b/src/lib/Common/Response.ts index 8f732f1..9db5340 100644 --- a/src/lib/Common/Response.ts +++ b/src/lib/Common/Response.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Common/index.ts b/src/lib/Common/index.ts index bd63df6..0dd7306 100644 --- a/src/lib/Common/index.ts +++ b/src/lib/Common/index.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Encoder/Decoder.ts b/src/lib/Encoder/Decoder.ts index b3be76a..697af60 100644 --- a/src/lib/Encoder/Decoder.ts +++ b/src/lib/Encoder/Decoder.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Encoder/Encoder.ts b/src/lib/Encoder/Encoder.ts index 1bd3af1..9bfd28a 100644 --- a/src/lib/Encoder/Encoder.ts +++ b/src/lib/Encoder/Encoder.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Encoder/Errors.ts b/src/lib/Encoder/Errors.ts index cafbc5a..6abacd5 100644 --- a/src/lib/Encoder/Errors.ts +++ b/src/lib/Encoder/Errors.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Errors.ts b/src/lib/Errors.ts index 24f7268..fcb8757 100644 --- a/src/lib/Errors.ts +++ b/src/lib/Errors.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Server/Common/Gateway.ts b/src/lib/Server/Common/Gateway.ts index 500459e..767bf93 100644 --- a/src/lib/Server/Common/Gateway.ts +++ b/src/lib/Server/Common/Gateway.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Server/Common/Request.ts b/src/lib/Server/Common/Request.ts index 51c676b..33faac6 100644 --- a/src/lib/Server/Common/Request.ts +++ b/src/lib/Server/Common/Request.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Server/Common/Router.ts b/src/lib/Server/Common/Router.ts index 0f3d45f..ebeb9f8 100644 --- a/src/lib/Server/Common/Router.ts +++ b/src/lib/Server/Common/Router.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Server/Common/Server.ts b/src/lib/Server/Common/Server.ts index 260295d..a3c4d19 100644 --- a/src/lib/Server/Common/Server.ts +++ b/src/lib/Server/Common/Server.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Server/Common/index.ts b/src/lib/Server/Common/index.ts index 2b6a8cd..eff95d6 100644 --- a/src/lib/Server/Common/index.ts +++ b/src/lib/Server/Common/index.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Server/Errors.ts b/src/lib/Server/Errors.ts index e81aeaf..1cd3a66 100644 --- a/src/lib/Server/Errors.ts +++ b/src/lib/Server/Errors.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Server/Gateways/Http.ts b/src/lib/Server/Gateways/Http.ts index 49487d1..1088b7a 100644 --- a/src/lib/Server/Gateways/Http.ts +++ b/src/lib/Server/Gateways/Http.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Server/Gateways/TCP.ts b/src/lib/Server/Gateways/TCP.ts index fd2d0cb..c73dd30 100644 --- a/src/lib/Server/Gateways/TCP.ts +++ b/src/lib/Server/Gateways/TCP.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Server/Server.ts b/src/lib/Server/Server.ts index 97f8528..01e6219 100644 --- a/src/lib/Server/Server.ts +++ b/src/lib/Server/Server.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Server/SimpleRouter.ts b/src/lib/Server/SimpleRouter.ts index 04ab169..ae64c3a 100644 --- a/src/lib/Server/SimpleRouter.ts +++ b/src/lib/Server/SimpleRouter.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/Server/index.ts b/src/lib/Server/index.ts index 034db16..f3d69a7 100644 --- a/src/lib/Server/index.ts +++ b/src/lib/Server/index.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lib/index.ts b/src/lib/index.ts index 0e7e6bc..0f9bd5a 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -1,5 +1,5 @@ /** - * Copyright 2021 Angus.Fenying + * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.