title: Call redux action within redux-saga inside websocket callback (stomp + sockjs)
body: <p>I am using <code>redux</code> and <code>redux-saga</code> in my project. Right now using WebSocket I have a problem calling a <code>FETCH_SUCCESS</code> <code>redux</code> action inside a callback of socket response. I tried making the callback a generator as well but didn't work as well.</p>
  
  <pre><code>function* websocketSaga() {
    const socket = new SockJS(`${CONFIG.API_URL}/ws`);
    const stomp = Stomp.over(socket);
    const token = yield select(selectToken);
    stomp.connect(
      {
        Authorization: `Bearer ${token}`,
      },
      frame =&gt; {
        stomp.subscribe('/queue/data', message =&gt; {
          const response = JSON.parse(message.body);
          console.log(response); // here is the proper response, it works
          put({
            type: FETCH_SUCCESS, // here the FETCH_SUCCESS action is not called
            payload: response.dataResponse,
          });
        });
        ...
        ....
      }
    );
  }
  </code></pre>
  
  <p>Or maybe this WebSocket should be implemented in a completely different way in <code>redux-saga</code>?</p>