socket-function 0.74.0 → 0.75.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socket-function",
3
- "version": "0.74.0",
3
+ "version": "0.75.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
@@ -148,7 +148,7 @@ export const runClientHooks = measureWrap(async function runClientHooks(
148
148
  let time = Date.now();
149
149
  await hook(context);
150
150
  time = Date.now() - time;
151
- if (time > 100) {
151
+ if (time > 500) {
152
152
  console.warn(`Slow (${formatTime(time)}) client hook: ${JSON.stringify(hook.name || hook.toString().slice(0, 100))} for ${callType.classGuid}.${callType.functionName}(...)`);
153
153
  }
154
154
  // NOTE: See ClientHookContext.overrideResult for why we break here
@@ -170,7 +170,7 @@ export const runServerHooks = measureWrap(async function runServerHooks(
170
170
  let time = Date.now();
171
171
  await _setSocketContext(caller, () => hook(hookContext));
172
172
  time = Date.now() - time;
173
- if (time > 100) {
173
+ if (time > 500) {
174
174
  console.warn(`Slow (${formatTime(time)}) server hook: ${JSON.stringify(hook.name || hook.toString().slice(0, 100))} for ${callType.classGuid}.${callType.functionName}(...)`);
175
175
  }
176
176
  // NOTE: See HookContext.overrideResult for why we don't break here
@@ -208,7 +208,7 @@ export async function startSocketServer(
208
208
  }
209
209
  let sni = data.extensions.filter(x => x.type === SNIType).flatMap(x => parseSNIExtension(x.data))[0];
210
210
  if (!SocketFunction.silent) {
211
- console.log(`Received TCP connection with SNI ${JSON.stringify(sni)}`);
211
+ console.log(`Received TCP connection with SNI ${JSON.stringify(sni)}. Have handlers for: ${Array.from(sniServers.keys()).join(", ")}`);
212
212
  }
213
213
  if (!sni) {
214
214
  console.warn(`No SNI found in TLS hello from ${debug}, using main server. Packets ${packetCount}`);