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; return null;
} }
public T? get<T>() { public new T? get<T>() {
foreach (StreamInteractionModule module in modules) { foreach (StreamInteractionModule module in modules) {
if (module.get_type() == typeof(T)) return (T?) module; if (module.get_type() == typeof(T)) return (T?) module;
} }

View file

@ -87,7 +87,7 @@ protected class ConferenceDetailsFragment : Box {
set { set {
if (value != null) { if (value != null) {
value.clicked.connect(() => { value.clicked.connect(() => {
on_ok_button_clicked(); on_ok_button_clicked.begin();
}); });
ok_button_ = value; 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) { 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 /* TODO: MUC Real JID
MucManager muc_manager = stream_interactor.get_module(MucManager.IDENTITY);
if (muc_manager.is_private_room(account, jid.bare_jid)) { if (muc_manager.is_private_room(account, jid.bare_jid)) {
Jid? real_jid = muc_manager.get_real_jid(jid, account); Jid? real_jid = muc_manager.get_real_jid(jid, account);
if (real_jid != null) { if (real_jid != null) {

View file

@ -61,7 +61,7 @@ public class XmppStream {
} }
if (stream == null) { if (stream == null) {
debug("Connecting to %s, xmpp-client, tcp (fallback)", this.remote_name.to_string()); 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) { if (stream == null) {
throw new IOStreamError.CONNECT("client.connect() returned null"); throw new IOStreamError.CONNECT("client.connect() returned null");