Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log: Do not log stack trace on disco#info timeout. #1109

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import org.jivesoftware.smack.ConnectionListener
import org.jivesoftware.smack.ReconnectionListener
import org.jivesoftware.smack.ReconnectionManager
import org.jivesoftware.smack.SASLAuthentication
import org.jivesoftware.smack.SmackException
import org.jivesoftware.smack.XMPPConnection
import org.jivesoftware.smack.tcp.XMPPTCPConnection
import org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration
Expand Down Expand Up @@ -236,6 +237,9 @@ class XmppProvider(val config: XmppConnectionConfig, parentLogger: Logger) {
val start = System.currentTimeMillis()
val featureStrings: List<String> = try {
discoveryManager.discoverInfo(jid)?.features?.map { it.`var` }?.toList() ?: emptyList()
} catch (e: SmackException.NoResponseException) {
logger.info("No response for disco#info, assuming default features.")
return Features.defaultFeatures
} catch (e: Exception) {
logger.warn("Failed to discover features for $jid: ${e.message}, assuming default feature set.", e)
return Features.defaultFeatures
Expand Down