JavaPhoenixClient icon indicating copy to clipboard operation
JavaPhoenixClient copied to clipboard

Leaving channel causes timeout

Open Maradox opened this issue 4 years ago • 5 comments

When leaving a channel I receive immediately the events:

Receive: {"event":"phx_reply","payload":{"response":{},"status":"ok"},"ref":"10","topic":"my_topic"} Receive: {"event":"phx_close","payload":{},"ref":"7","topic":"my_topic"}

However, channel.onClose() is triggered 10 seconds later due to timeout. This happens everytime.

Maradox avatar Aug 26 '21 16:08 Maradox

are you removing the channel from the socket as well?

channel.leave()
socket.remove(channel)

dsrees avatar Aug 27 '21 14:08 dsrees

Yes, I also remove the channel.

Maradox avatar Aug 30 '21 08:08 Maradox

@dsrees Is there an update on this Since we are also facing this issue??

ankushaspiring avatar Sep 08 '22 08:09 ankushaspiring

There is not. If you have time and want to investigate and submit a PR, I will gladly review it

dsrees avatar Sep 09 '22 13:09 dsrees

@dsrees If there is no activity on the fragment/activity , channels gets close(not sure why) which in turn closes the socket, then socket gets open again by the phoenix client, but why does it gets close every time after some n secs, also is there a way to increase this time limit. Thanks a lot.

ankushaspiring avatar Sep 12 '22 05:09 ankushaspiring