aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZoffix Znet <cpan@zoffix.com>2016-07-28 22:52:25 -0400
committerZoffix Znet <cpan@zoffix.com>2016-07-28 22:52:25 -0400
commitcf80b1b4392b849cb5529c1a40083170098f6460 (patch)
treeb3a322c2c6dabd2ad31af74face9135ddb899445 /lib
parent92e16c5d823c16267b42ae9ea056f931cec96de4 (diff)
Docs
Diffstat (limited to 'lib')
-rw-r--r--lib/IRC/Client.pm62
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/IRC/Client.pm6 b/lib/IRC/Client.pm6
index 4055f1b..44393f3 100644
--- a/lib/IRC/Client.pm6
+++ b/lib/IRC/Client.pm6
@@ -158,6 +158,7 @@ method !connect-socket ($server) {
$!debug and debug-print 'Attempting to connect to server', :out, :$server;
IO::Socket::Async.connect($server.host, $server.port).then: sub ($prom) {
if $prom.status ~~ Broken {
+ $server.is-connected = False;
$!debug and debug-print 'Could not connect', :out, :$server;
sleep 5;
$!socket-pipe.send: $server;
@@ -188,6 +189,7 @@ method !connect-socket ($server) {
}
unless $server.has-quit {
+ $server.is-connected = False;
$!debug and debug-print "Connection closed", :in, :$server;
sleep 5;
}