Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

Receive loop is racey #89

Open
BrennanConroy opened this issue Jan 30, 2015 · 1 comment
Open

Receive loop is racey #89

BrennanConroy opened this issue Jan 30, 2015 · 1 comment
Milestone

Comments

@BrennanConroy
Copy link
Member

TEST(websocket_transport_connect, transport_destroyed_even_if_disconnect_not_called)
On fast computers this fails very often because the transport shared pointer is acquired in the receive loop before the old receive loop finishes and destroys it acquired shared pointer. This could potentially "never" finish or take a very long time in production, wasting cpu cycles/resources.

@moozzyk
Copy link
Contributor

moozzyk commented Feb 12, 2015

The best way of fixing this might be to get rid of the receive loop altogether. The casablanca's websocket client is going to have 'message_received' and 'websocket_closed' events in the (hopefully) next version and we should look into using these instead of having our receive loop. It should also simplify the websocket transport.

@muratg muratg added this to the Backlog milestone Sep 9, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants