hirosystems / stacks-blockchain-api

API for the Stacks blockchain
https://stacks-blockchain-api.vercel.app
GNU General Public License v3.0
178 stars 114 forks source link

Fix: socket-io reconnect #2174

Closed zone117x closed 3 days ago

zone117x commented 3 days ago

Closes https://github.com/hirosystems/stacks-blockchain-api/issues/2146

There's a bug in the socket-io client reconnection logic, where an invalid empty topic was being sent.

client.socket.on('connect_error', error => {
  console.error('Socket connection was denied by the server', error);
  // > Socket connection was denied by the server Error: Invalid topic: 
});

This PR fixes the bug in the client, and also updates the server code to ignore empty topics so that existing client versions will work.

github-actions[bot] commented 3 days ago

Vercel deployment URL: https://stacks-blockchain-dkcjjes6g-hirosystems.vercel.app :rocket:

codecov[bot] commented 3 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:loudspeaker: Thoughts on this report? Let us know!

blockstack-devops commented 3 days ago

:tada: This PR is included in version 8.3.0-beta.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: