question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with how multiple websockets connections (and potentially sessions) are handled

See original GitHub issue

I initially connected to Websockets in one project and it worked fine. I wanted to connect from another project using the same credentials, however authentication does not work.

Now I understand connections are limited to a single client, but the connection is not working from my second project even after calling client.disconnect() from my first project. Using onStateChange prints the following to the console:

State changed to authenticating
State changed to disconnected

Using the websockets example code from Polygon worked fine and resulted in a connection, which successfully authenticates, and then disconnects both the current connection and first project’s connection. The good thing about this is that it prints a helpful error message to the console: Status Update: Maximum number of connections exceeded I can then reconnect again with no problems Sidenote: The Polygon direct websocket connection still disconnects even when you set usePolygon to false on the Alpaca authentication object.

I believe there is an issue with how multiple connections are handled in this repo. It prevents connection from another codebase (even after the first one is disconnected), and does not provide any helpful error message

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
shlomikushchicommented, May 14, 2020

@kevinsherman please install the udpated version and try again install directly from github

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Avoid Multiple WebSocket Connections in a React ...
In this post, you'll learn how WebSocket connections work in a React Chat app and how to avoid concurrent connections with Stream's Chat ......
Read more >
Multiple initiated Websocket connections have an increased ...
This is an internal webapp I've developed. The following code is what I run as soon as the page is opened. websock.pWebsocket =...
Read more >
Best approach to multiple websocket client connections in ...
Answering my own question, in the hope that it may help other Python newcomers... asyncio seems to be the way to go (though...
Read more >
Multiple connections, but single websocket.on("message ...
The issue is most likely with your session handling code and not with WS. Have you tried using ws.on('message' instead of session.on('message' ?...
Read more >
WebSockets - A Conceptual Deep Dive - Ably Realtime
Most decent WebSocket servers can support thousands of concurrent connections. The real issue is the workload required to process and respond to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found