From 9f87ef34c589825d65824a8c9210fed5bf92f94d Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 4 Jul 2023 12:33:12 +0200 Subject: Remove runStreamPair() This will not be used in the new RX concept. --- xmpp/streams.go | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'xmpp/streams.go') diff --git a/xmpp/streams.go b/xmpp/streams.go index 5ba4c1d..388be4d 100644 --- a/xmpp/streams.go +++ b/xmpp/streams.go @@ -5,35 +5,6 @@ import ( "log" ) -func runStreamPair(s *session) { - end := openStream(s) - defer closeStream(s, end) - - buf := newElementBuffer() - - for { - select { - 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 { - log.Printf("Could not add XML token to buffer: %v\n", err) - return - } - if buf.isComplete() { - element := buf.reset() - route(s, element, getRoutingTable()) - } - } - } -} - func openStream(s *session) xml.EndElement { start := xml.StartElement{ xml.Name{"jabber:client", "stream:stream"}, -- cgit v1.2.3-70-g09d2