From 81505513ad67722c243128434a28141f2cda5f20 Mon Sep 17 00:00:00 2001 From: blackbeard420 Date: Wed, 27 Oct 2021 21:53:28 -0400 Subject: [PATCH] fix test --- irc_test.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/irc_test.go b/irc_test.go index 0367ca2..d17fc37 100644 --- a/irc_test.go +++ b/irc_test.go @@ -84,11 +84,13 @@ func TestGetServerInfo(t *testing.T) { con.NumericCallback = func(from string, i int, args string) { if i == RPL_ENDOFMOTD { - res := GetServerInfo("irc.libera.chat:6667", "irc-go4240") - con.SendPrivmsg(channel, fmt.Sprintf("Libera has %d users, %d channels, %d servers, %d invisible", res.Users, res.Channels, res.Servers, res.Invisible)) - res = GetServerInfo("irc.choopa.net:6667", "irc-go4240") - con.SendPrivmsg(channel, fmt.Sprintf("EFNet has %d users, %d channels, %d servers, %d invisible", res.Users, res.Channels, res.Servers, res.Invisible)) - con.SendQuit("Scan Completed") + go func() { + res := GetServerInfo("irc.libera.chat:6667", "irc-go4240") + con.SendPrivmsg(channel, fmt.Sprintf("Libera has %d users, %d channels, %d servers, %d invisible", res.Users, res.Channels, res.Servers, res.Invisible)) + res = GetServerInfo("irc.choopa.net:6667", "irc-go4240") + con.SendPrivmsg(channel, fmt.Sprintf("EFNet has %d users, %d channels, %d servers, %d invisible", res.Users, res.Channels, res.Servers, res.Invisible)) + con.SendQuit("Scan Completed") + }() } }