Comments (2)
Can you provide an example where this happens? I just hacked together a little piece of code which sends 10 messages for 10 users in a short time and all worked well:
package main
import (
"crypto/tls"
"fmt"
"log"
"net"
"strconv"
"strings"
"github.com/xmppo/go-xmpp"
"salsa.debian.org/mdosch/xmppsrv"
)
func main() {
user1 := REDACTED
pw1 := REDACTED
user2 := REDACTED
pw2 := REDACTED
user3 := REDACTED
pw3 := REDACTED
user4 := REDACTED
pw4 := REDACTED
user5 := REDACTED
pw5 := REDACTED
user6 := REDACTED
pw6 := REDACTED
user7 := REDACTED
pw7 := REDACTED
user8 := REDACTED
pw8 := REDACTED
user9 := REDACTED
pw9 := REDACTED
user10 := REDACTED
pw10 := REDACTED
srv, err := xmppsrv.LookupClient(strings.Split(user1, "@")[1])
if err != nil {
log.Fatal(err)
}
server := net.JoinHostPort(srv[0].Target, fmt.Sprint(srv[0].Port))
directTLS := false
if srv[0].Type == "xmpps-client" {
directTLS = true
}
options1 := xmpp.Options{
Host: server,
User: user1,
Password: pw1,
Debug: true,
Mechanism: "SCRAM-SHA-1",
NoTLS: !directTLS,
StartTLS: !directTLS,
TLSConfig: &tls.Config{
ServerName: strings.Split(user1, "@")[1],
NextProtos: []string{"xmpp-client"},
},
}
srv, err = xmppsrv.LookupClient(strings.Split(user2, "@")[1])
if err != nil {
log.Fatal(err)
}
server = net.JoinHostPort(srv[0].Target, fmt.Sprint(srv[0].Port))
directTLS = false
if srv[0].Type == "xmpps-client" {
directTLS = true
}
options2 := xmpp.Options{
Host: server,
User: user2,
Password: pw2,
Debug: true,
Mechanism: "SCRAM-SHA-1",
NoTLS: !directTLS,
StartTLS: !directTLS,
TLSConfig: &tls.Config{
ServerName: strings.Split(user2, "@")[1],
NextProtos: []string{"xmpp-client"},
},
}
srv, err = xmppsrv.LookupClient(strings.Split(user3, "@")[1])
if err != nil {
log.Fatal(err)
}
server = net.JoinHostPort(srv[0].Target, fmt.Sprint(srv[0].Port))
directTLS = false
if srv[0].Type == "xmpps-client" {
directTLS = true
}
options3 := xmpp.Options{
Host: server,
User: user3,
Password: pw3,
Debug: true,
// Mechanism: "SCRAM-SHA-1",
NoTLS: !directTLS,
StartTLS: !directTLS,
TLSConfig: &tls.Config{
ServerName: strings.Split(user3, "@")[1],
NextProtos: []string{"xmpp-client"},
},
}
srv, err = xmppsrv.LookupClient(strings.Split(user4, "@")[1])
if err != nil {
log.Fatal(err)
}
server = net.JoinHostPort(srv[0].Target, fmt.Sprint(srv[0].Port))
directTLS = false
if srv[0].Type == "xmpps-client" {
directTLS = true
}
options4 := xmpp.Options{
Host: server,
User: user4,
Password: pw4,
Debug: true,
Mechanism: "SCRAM-SHA-1",
NoTLS: !directTLS,
StartTLS: !directTLS,
TLSConfig: &tls.Config{
ServerName: strings.Split(user4, "@")[1],
NextProtos: []string{"xmpp-client"},
},
}
srv, err = xmppsrv.LookupClient(strings.Split(user5, "@")[1])
if err != nil {
log.Fatal(err)
}
server = net.JoinHostPort(srv[0].Target, fmt.Sprint(srv[0].Port))
directTLS = false
if srv[0].Type == "xmpps-client" {
directTLS = true
}
options5 := xmpp.Options{
Host: server,
User: user5,
Password: pw5,
Debug: true,
Mechanism: "SCRAM-SHA-1",
NoTLS: !directTLS,
StartTLS: !directTLS,
TLSConfig: &tls.Config{
ServerName: strings.Split(user5, "@")[1],
NextProtos: []string{"xmpp-client"},
},
}
srv, err = xmppsrv.LookupClient(strings.Split(user6, "@")[1])
if err != nil {
log.Fatal(err)
}
server = net.JoinHostPort(srv[0].Target, fmt.Sprint(srv[0].Port))
directTLS = false
if srv[0].Type == "xmpps-client" {
directTLS = true
}
options6 := xmpp.Options{
Host: server,
User: user6,
Password: pw6,
Debug: true,
Mechanism: "SCRAM-SHA-1",
NoTLS: !directTLS,
StartTLS: !directTLS,
TLSConfig: &tls.Config{
ServerName: strings.Split(user6, "@")[1],
NextProtos: []string{"xmpp-client"},
},
}
srv, err = xmppsrv.LookupClient(strings.Split(user7, "@")[1])
if err != nil {
log.Fatal(err)
}
server = net.JoinHostPort(srv[0].Target, fmt.Sprint(srv[0].Port))
directTLS = false
if srv[0].Type == "xmpps-client" {
directTLS = true
}
options7 := xmpp.Options{
Host: server,
User: user7,
Password: pw7,
Debug: true,
Mechanism: "SCRAM-SHA-1",
NoTLS: !directTLS,
StartTLS: !directTLS,
TLSConfig: &tls.Config{
ServerName: strings.Split(user7, "@")[1],
NextProtos: []string{"xmpp-client"},
},
}
srv, err = xmppsrv.LookupClient(strings.Split(user8, "@")[1])
if err != nil {
log.Fatal(err)
}
server = net.JoinHostPort(srv[0].Target, fmt.Sprint(srv[0].Port))
directTLS = false
if srv[0].Type == "xmpps-client" {
directTLS = true
}
options8 := xmpp.Options{
Host: server,
User: user8,
Password: pw8,
Debug: true,
// Mechanism: "SCRAM-SHA-1",
NoTLS: !directTLS,
StartTLS: !directTLS,
TLSConfig: &tls.Config{
ServerName: strings.Split(user8, "@")[1],
NextProtos: []string{"xmpp-client"},
},
}
srv, err = xmppsrv.LookupClient(strings.Split(user9, "@")[1])
if err != nil {
log.Fatal(err)
}
server = net.JoinHostPort(srv[0].Target, fmt.Sprint(srv[0].Port))
directTLS = false
if srv[0].Type == "xmpps-client" {
directTLS = true
}
options9 := xmpp.Options{
Host: server,
User: user9,
Password: pw9,
Debug: true,
Mechanism: "SCRAM-SHA-1",
NoTLS: !directTLS,
StartTLS: !directTLS,
TLSConfig: &tls.Config{
ServerName: strings.Split(user9, "@")[1],
NextProtos: []string{"xmpp-client"},
},
}
srv, err = xmppsrv.LookupClient(strings.Split(user10, "@")[1])
if err != nil {
log.Fatal(err)
}
server = net.JoinHostPort(srv[0].Target, fmt.Sprint(srv[0].Port))
directTLS = false
if srv[0].Type == "xmpps-client" {
directTLS = true
}
options10 := xmpp.Options{
Host: server,
User: user10,
Password: pw10,
Debug: true,
Mechanism: "SCRAM-SHA-1",
NoTLS: !directTLS,
StartTLS: !directTLS,
TLSConfig: &tls.Config{
ServerName: strings.Split(user10, "@")[1],
NextProtos: []string{"xmpp-client"},
},
}
conn1, err := options1.NewClient()
if err != nil {
log.Fatal(err)
}
conn2, err := options2.NewClient()
if err != nil {
log.Fatal(err)
}
conn3, err := options3.NewClient()
if err != nil {
log.Fatal(err)
}
conn4, err := options4.NewClient()
if err != nil {
log.Fatal(err)
}
conn5, err := options5.NewClient()
if err != nil {
log.Fatal(err)
}
conn6, err := options6.NewClient()
if err != nil {
log.Fatal(err)
}
conn7, err := options7.NewClient()
if err != nil {
log.Fatal(err)
}
conn8, err := options8.NewClient()
if err != nil {
log.Fatal(err)
}
conn9, err := options9.NewClient()
if err != nil {
log.Fatal(err)
}
conn10, err := options10.NewClient()
if err != nil {
log.Fatal(err)
}
for i := 1; i < 11; i++ {
msg := "Test " + strconv.Itoa(i)
conn1.Send(xmpp.Chat{Remote: "REDACTED", Type: "chat", Text: msg})
conn2.Send(xmpp.Chat{Remote: "REDACTED", Type: "chat", Text: msg})
conn3.Send(xmpp.Chat{Remote: "REDACTED", Type: "chat", Text: msg})
conn4.Send(xmpp.Chat{Remote: "REDACTED", Type: "chat", Text: msg})
conn5.Send(xmpp.Chat{Remote: "REDACTED", Type: "chat", Text: msg})
conn6.Send(xmpp.Chat{Remote: "REDACTED", Type: "chat", Text: msg})
conn7.Send(xmpp.Chat{Remote: "REDACTED", Type: "chat", Text: msg})
conn8.Send(xmpp.Chat{Remote: "REDACTED", Type: "chat", Text: msg})
conn9.Send(xmpp.Chat{Remote: "REDACTED", Type: "chat", Text: msg})
conn10.Send(xmpp.Chat{Remote: "REDACTED", Type: "chat", Text: msg})
}
}
from go-xmpp.
@anoop012345 any news?
from go-xmpp.
Related Issues (20)
- Implement OpenPGP xep-0027 HOT 1
- XEP-0479: XMPP Compliance Suites 2023 HOT 1
- XEPs and RFCs support page with version HOT 1
- connect should use a net.Dialer or net.DialTimeout to guard against indefinitely long blocking
- User Avatar Implementation
- ServerName not used?
- Can't access error replies for IQs
- Golang XML vulnerabilities HOT 1
- Broken URL in oob message. HOT 3
- Go-xmpp doesn't forbid/filter illegal sequences
- Get body for auth success
- Extend SendPresence() to at least minimal useful form HOT 1
- Close Recv() before closing connection HOT 3
- No proper errror message for failed auth when using SCRAM HOT 6
- New release build? HOT 3
- xmppo/go-xmpp or mattn/go-xmpp HOT 1
- auth failure: Invalid channel binding HOT 3
- XEP-0384: OMEMO Encryption HOT 1
- auth failure: SASL negotiation is not allowed in this state HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-xmpp.