@mstuercke/api-utils 6.0.2 → 6.0.3
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
|
@@ -106,8 +106,9 @@ export const awsLambdaTrpcSubscriptionRequestHandler = <Router extends AnyTRPCRo
|
|
|
106
106
|
stopped = message.result.type === 'stopped'
|
|
107
107
|
|
|
108
108
|
if (Date.now() > lastPing + pingIntervalMs) {
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
const connected = await isConnected()
|
|
110
|
+
if (!connected) {
|
|
111
|
+
console.info('Ping: Connection closed by client')
|
|
111
112
|
stopped = true
|
|
112
113
|
}
|
|
113
114
|
lastPing = Date.now()
|
|
@@ -116,7 +117,7 @@ export const awsLambdaTrpcSubscriptionRequestHandler = <Router extends AnyTRPCRo
|
|
|
116
117
|
}
|
|
117
118
|
} catch (err) {
|
|
118
119
|
if (err instanceof GoneException) {
|
|
119
|
-
console.info('Connection closed by client')
|
|
120
|
+
console.info('Error: Connection closed by client', err.message)
|
|
120
121
|
} else {
|
|
121
122
|
console.error(err)
|
|
122
123
|
await stopConnection()
|