xmpp.js icon indicating copy to clipboard operation
xmpp.js copied to clipboard

Ability to disable HTTP resolution

Open JorgenPhi opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. I am connecting to a host that does not have an HTTP service. When trying to resolve over HTTP, the client hangs and waits until the connection times out before continuing.

Describe the solution you'd like A way to disable the HTTP resolution.

JorgenPhi avatar Apr 01 '22 00:04 JorgenPhi

the client hangs and waits until the connection times out before continuing.

For how long?

If they don't have any HTTP service, there shouldn't be any hang – just a quick and simple connection refused.

In general we avoid options on @xmpp/client which is meant to be a standard client for all. Unless you believe this bug affect others, please use a custom client and discard what you don't need.

https://github.com/xmppjs/xmpp.js/blob/main/packages/client/index.js

One option here would be to omit const _resolve = require("@xmpp/resolve"); and use a direct xmpp uri instead of hostname.

sonnyp avatar Aug 10 '22 20:08 sonnyp