~samwhited/xmpp

9c32ae2751efe4318e4cb90401cc98b01b2d901f — Sam Whited a month ago 5fc67fa
internal/integration: fix panic if S2S is enabled

Signed-off-by: Sam Whited <sam@samwhited.com>
1 files changed, 4 insertions(+), 2 deletions(-)

M internal/integration/integration.go
M internal/integration/integration.go => internal/integration/integration.go +4 -2
@@ 169,11 169,13 @@ func (cmd *Cmd) dial(ctx context.Context, s2s bool, location, origin jid.JID, t 
		return nil, errors.New("c2s not configured, please configure a c2s listener")
	}

	addr := cmd.c2sListener.Addr().String()
	network := cmd.c2sNetwork
	var addr, network string
	if s2s {
		addr = cmd.s2sListener.Addr().String()
		network = cmd.s2sNetwork
	} else {
		addr = cmd.c2sListener.Addr().String()
		network = cmd.c2sNetwork
	}

	conn, err := net.Dial(network, addr)