Skip to content

Commit c931c13

Browse files
committed
v3.0.2: Socket.IO use WebSocket transport directly
Fixes connection failures against service-core v2 cluster mode which disables HTTP long-polling. WebSocket-first is faster anyway (no polling→upgrade overhead).
1 parent ea6c1f7 commit c931c13

6 files changed

Lines changed: 8 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
<!-- Format based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -->
44

5+
## [3.0.2](https://github.com/pryv/lib-js/compare/3.0.0...3.0.2)
6+
- Socket.IO: use WebSocket transport directly instead of polling-first. Fixes connection failures against service-core v2 cluster mode (which disables HTTP long-polling).
7+
58
## [3.0.0](https://github.com/pryv/lib-js/compare/2.4.5...3.0.0)
69
- Removing superagent dependency (breaking change)
710
- Enhancing test suite

components/pryv-monitor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pryv/monitor",
3-
"version": "3.0.1",
3+
"version": "3.0.2",
44
"description": "Extends `pryv` with event-driven notifications for changes on a Pryv.io account",
55
"keywords": [
66
"Pryv",

components/pryv-socket.io/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pryv/socket.io",
3-
"version": "3.0.1",
3+
"version": "3.0.2",
44
"description": "Extends `pryv` with Socket.IO transport",
55
"keywords": [
66
"Pryv",

components/pryv-socket.io/src/SocketIO.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class SocketIO extends EventEmitter {
4141
.then(username => {
4242
const socketEndpoint = this.connection.endpoint + username + '?auth=' + this.connection.token;
4343
// @ts-ignore - io is callable in socket.io-client
44-
this._io = io(socketEndpoint, { forceNew: true });
44+
this._io = io(socketEndpoint, { forceNew: true, transports: ['websocket'] });
4545

4646
// handle failure
4747
for (const errcode of ['connect_error', 'connection_failed', 'error', 'connection_timeout']) {

components/pryv/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pryv",
3-
"version": "3.0.1",
3+
"version": "3.0.2",
44
"description": "Pryv JavaScript library",
55
"keywords": [
66
"Pryv",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lib-js",
3-
"version": "3.0.1",
3+
"version": "3.0.2",
44
"private": false,
55
"description": "Pryv JavaScript library and add-ons",
66
"keywords": [

0 commit comments

Comments
 (0)