binaryminds/react-native-sse

No activity within 45000 milliseconds.

Closed this issue · 0 comments

client disconnect and re-connect after 45 second
I'm using redux-saga channel to handle the messages

P V
React Native 0.68.2
Node 14.20
react-native-sse 5.4
const eventSource = yield call(mercureSubscribe, new URL(HUB_URL), [topic])
const channel = yield call(mercureChannel, eventSource)
function mercureChannel(eventSource) {
  return eventChannel((emitter) => {
    eventSource.addEventListener('message', (event) =>
      emitter(JSON.parse(event.data)),
    )
    return () => eventSource.close()
  })
}