Don't attempt DNS SRV lookups in connection fallback

This commit is contained in:
fiaxh 2019-11-18 22:45:18 +01:00
parent fcce176b91
commit 41ada4fcc8
4 changed files with 4 additions and 4 deletions

View file

@ -58,7 +58,7 @@ public class StreamInteractor : Object {
return null;
}
public T? get<T>() {
public new T? get<T>() {
foreach (StreamInteractionModule module in modules) {
if (module.get_type() == typeof(T)) return (T?) module;
}

View file

@ -87,7 +87,7 @@ protected class ConferenceDetailsFragment : Box {
set {
if (value != null) {
value.clicked.connect(() => {
on_ok_button_clicked();
on_ok_button_clicked.begin();
});
ok_button_ = value;

View file

@ -177,8 +177,8 @@ private static string get_groupchat_display_name(StreamInteractor stream_interac
}
private static string get_occupant_display_name(StreamInteractor stream_interactor, Account account, Jid jid, bool me_is_me = false) {
MucManager muc_manager = stream_interactor.get_module(MucManager.IDENTITY);
/* TODO: MUC Real JID
MucManager muc_manager = stream_interactor.get_module(MucManager.IDENTITY);
if (muc_manager.is_private_room(account, jid.bare_jid)) {
Jid? real_jid = muc_manager.get_real_jid(jid, account);
if (real_jid != null) {

View file

@ -61,7 +61,7 @@ public class XmppStream {
}
if (stream == null) {
debug("Connecting to %s, xmpp-client, tcp (fallback)", this.remote_name.to_string());
stream = yield (new SocketClient()).connect_async(new NetworkService("xmpp-client", "tcp", this.remote_name.to_string()));
stream = yield (new SocketClient()).connect_to_host_async(this.remote_name.to_string(), 5222);
}
if (stream == null) {
throw new IOStreamError.CONNECT("client.connect() returned null");