summaryrefslogtreecommitdiff
path: root/xmpp/session.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-06-27 15:51:09 +0200
committerxengineering <me@xengineering.eu>2023-06-27 15:51:09 +0200
commit8965adcdbc5ccf30afdccac31cc3a6f9d7451b91 (patch)
tree1a33b14bf505ebca382afd5dfa789f5e8117b285 /xmpp/session.go
parentd27744d56b41aa9dd68502bd529dbf3fc083ed1d (diff)
downloadlimox-8965adcdbc5ccf30afdccac31cc3a6f9d7451b91.tar
limox-8965adcdbc5ccf30afdccac31cc3a6f9d7451b91.tar.zst
limox-8965adcdbc5ccf30afdccac31cc3a6f9d7451b91.zip
Apply go fmt
Diffstat (limited to 'xmpp/session.go')
-rw-r--r--xmpp/session.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/xmpp/session.go b/xmpp/session.go
index e928f01..9959c80 100644
--- a/xmpp/session.go
+++ b/xmpp/session.go
@@ -3,8 +3,8 @@ package xmpp
import (
"crypto/tls"
"crypto/x509"
- "log"
"encoding/xml"
+ "log"
)
type SessionConnect struct{}
@@ -37,7 +37,9 @@ func (s *session) run() {
defer func() { s.out <- SessionDisconnect{} }()
err := s.startTransport()
- if err != nil { return }
+ if err != nil {
+ return
+ }
defer s.transport.Close()
s.ed = newEncoderDecoder(s)
@@ -53,8 +55,10 @@ func (s *session) run() {
select {
case data := <-s.in:
switch data.(type) {
- case SessionShouldDisconnect: return
- default: log.Printf("Unknown data '%d'!\n", data)
+ case SessionShouldDisconnect:
+ return
+ default:
+ log.Printf("Unknown data '%d'!\n", data)
}
case _ = <-s.rx:
// TODO route received XML token here