Closed yatharthranjan closed 5 years ago
Might be good to keep a monitor on the logs for disconnection (in case there are any other scenarios where this happens)
Yes that is exactly how I found this bug, as this is very internal and no error is thrown since its the expected behaviour but apparently is not documented well anywhere.
ok great.
expected behaviour but apparently is not documented well anywhere. :thinking: you might want to send a PR upstream too
🤔 you might want to send a PR upstream too
Yes perhaps. But our codebase includes various things specific to Radar-base.
The FCM server sends disconnection requests once in a while (according to docs this is for periodic maintenance, cleaning of stale connections, etc). When this occurs the connection needs to be closed and connected again.
The smack library sends a
presence unavailable
(<presence id='tMZDi-119397' type='unavailable'></presence>
) message and closes the connection when such a request is received from the server as mentioned in the java docs in this PR.This PR adds an interceptor to intercept the presence message and issue a reconnection.
This also increases the log retention from 7 days to 30 days for normal level logs and 60 days for error logs.