@hocuspocus/server
Advanced tools
Comparing version 1.0.0-beta.2 to 1.0.0-beta.3
@@ -57,9 +57,2 @@ /// <reference types="node" /> | ||
/** | ||
* Handle a ws instance error, which is required to prevent | ||
* the server from crashing when one happens | ||
* See https://github.com/websockets/ws/issues/1777#issuecomment-660803472 | ||
* @private | ||
*/ | ||
private handleError; | ||
/** | ||
* Get the underlying connection instance | ||
@@ -66,0 +59,0 @@ * @deprecated |
{ | ||
"name": "@hocuspocus/server", | ||
"description": "plug & play collaboration backend", | ||
"version": "1.0.0-beta.2", | ||
"version": "1.0.0-beta.3", | ||
"homepage": "https://hocuspocus.dev", | ||
@@ -31,3 +31,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@hocuspocus/common": "^1.0.0-beta.2", | ||
"@hocuspocus/common": "^1.0.0-beta.3", | ||
"@types/async-lock": "^1.1.3", | ||
@@ -40,3 +40,5 @@ "@types/uuid": "^8.3.4", | ||
"uuid": "^8.3.2", | ||
"ws": "^8.5.0", | ||
"ws": "^8.5.0" | ||
}, | ||
"peerDependencies": { | ||
"y-protocols": "^1.0.5", | ||
@@ -43,0 +45,0 @@ "yjs": "^13.5.29" |
@@ -75,3 +75,2 @@ import AsyncLock from 'async-lock' | ||
this.webSocket.on('pong', () => { this.pongReceived = true }) | ||
this.webSocket.on('error', this.handleError.bind(this)) | ||
@@ -202,13 +201,2 @@ this.sendCurrentAwareness() | ||
/** | ||
* Handle a ws instance error, which is required to prevent | ||
* the server from crashing when one happens | ||
* See https://github.com/websockets/ws/issues/1777#issuecomment-660803472 | ||
* @private | ||
*/ | ||
private handleError(error: any): void { | ||
this.logger.log('Error emitted from webSocket instance:') | ||
this.logger.log(error) | ||
} | ||
/** | ||
* Get the underlying connection instance | ||
@@ -215,0 +203,0 @@ * @deprecated |
@@ -179,2 +179,14 @@ import * as decoding from 'lib0/decoding' | ||
webSocketServer.on('connection', async (incoming: WebSocket, request: IncomingMessage) => { | ||
incoming.on('error', error => { | ||
/** | ||
* Handle a ws instance error, which is required to prevent | ||
* the server from crashing when one happens | ||
* See https://github.com/websockets/ws/issues/1777#issuecomment-660803472 | ||
* @private | ||
*/ | ||
this.debugger.log('Error emitted from webSocket instance:') | ||
this.debugger.log(error) | ||
}) | ||
this.handleConnection(incoming, request, await this.getDocumentNameFromRequest(request)) | ||
@@ -181,0 +193,0 @@ }) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
639273
7783
- Removedy-protocols@^1.0.5
- Removedyjs@^13.5.29