summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-07-03 13:55:52 +0200
committerxengineering <me@xengineering.eu>2023-07-03 13:55:52 +0200
commit4bca452afe2b91dd6933738a87247eab960c2959 (patch)
tree5a5dd6bbabbc46e77c2575c0665eb41b92aad16f
parent322e2c5f24c830282dbd66adbb95a7acf1255c9a (diff)
downloadlimox-4bca452afe2b91dd6933738a87247eab960c2959.tar
limox-4bca452afe2b91dd6933738a87247eab960c2959.tar.zst
limox-4bca452afe2b91dd6933738a87247eab960c2959.zip
BROKEN: Make bug reliable
This should make the race appear reliable if a second connection attempt is made. It is important to have a reliable error to fix it reliably.
-rw-r--r--xmpp/stream_pair.go28
1 files changed, 14 insertions, 14 deletions
diff --git a/xmpp/stream_pair.go b/xmpp/stream_pair.go
index 87df86a..2feea6b 100644
--- a/xmpp/stream_pair.go
+++ b/xmpp/stream_pair.go
@@ -13,13 +13,13 @@ func runStreamPair(s *session) {
for {
select {
- case data := <-s.in:
- switch data.(type) {
- case SessionShouldDisconnect:
- return
- default:
- log.Printf("Unknown data '%d'!\n", data)
- }
+// case data := <-s.in:
+// switch data.(type) {
+// case SessionShouldDisconnect:
+// return
+// default:
+// log.Printf("Unknown data '%d'!\n", data)
+// }
case t := <-s.rx:
err := buf.add(t)
if err != nil {
@@ -66,13 +66,13 @@ func openStream(s *session) xml.EndElement {
func syncStreams(s *session) {
for {
select {
- case data := <-s.in:
- switch data.(type) {
- case SessionShouldDisconnect:
- return
- default:
- log.Printf("Unhandled data '%d' during stream sync!\n", data)
- }
+// case data := <-s.in:
+// switch data.(type) {
+// case SessionShouldDisconnect:
+// return
+// default:
+// log.Printf("Unhandled data '%d' during stream sync!\n", data)
+// }
case t := <-s.rx:
switch token := t.(type) {
case xml.StartElement: