git » sdk » commit 7d90eaf

Better auth failure detection

author Stephen Paul Weber
2026-01-12 21:01:04 UTC
committer Stephen Paul Weber
2026-01-12 21:01:04 UTC
parent f66aaff5a307943164aba421ada35e5d8c25ddcb

Better auth failure detection

borogove/streams/XmppStropheStream.hx +2 -2

diff --git a/borogove/streams/XmppStropheStream.hx b/borogove/streams/XmppStropheStream.hx
index 393b9ab..e2a428b 100644
--- a/borogove/streams/XmppStropheStream.hx
+++ b/borogove/streams/XmppStropheStream.hx
@@ -319,8 +319,8 @@ class XmppStropheStream extends GenericStream {
 			stream.trigger("status/online", {});
 		}
 		if (event == untyped __cpp__("XMPP_CONN_DISCONNECT")) {
-			if (!stream.ready) {
-				// Never connected, auth failure
+			if (error == 0 && stream_error == null) {
+				// No error, auth failure
 				stream.trigger("auth/fail", {});
 			} else {
 				stream.ready = false;