itaylor / redux-socket.io

An opinionated connector between socket.io and redux
410 stars 53 forks source link

Server->client messages are getting echoed back to the websocket server #37

Open circuitry opened 6 years ago

circuitry commented 6 years ago

I am trying to send a message from a server to a client and to have an action dispatched client-side.

The action is getting dispatched successfully, but the client echos back the message it received to the server, resulting in unnecessary server traffic. Is there any way to disable this server->client->server echoing behavior?

DaneSirois commented 6 years ago

Hmm, it sounds like it might be configuration issue. Are the actions that you are dispatching from your server prefixed with server/? I have not confirmed, but I would assume that if you emit an action from your server with the websocket prefix that it would echo it back like you are describing