From 453063fbc5e674e6277274c328de0bacdcff5cd3 Mon Sep 17 00:00:00 2001
From: Patrick Spek
Date: Sat, 15 Dec 2018 22:43:18 +0100
Subject: Add the reason for why the connection failed when :debug is True
---
lib/IRC/Client.pm6 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/IRC/Client.pm6 b/lib/IRC/Client.pm6
index 7406944..cd2348e 100644
--- a/lib/IRC/Client.pm6
+++ b/lib/IRC/Client.pm6
@@ -186,7 +186,7 @@ method !connect-socket ($server) {
$socket.then: sub ($prom) {
if $prom.status ~~ Broken {
$server.is-connected = False;
- $!debug and debug-print 'Could not connect', :out, :$server;
+ $!debug and debug-print "Could not connect: $prom.cause()", :out, :$server;
sleep 10;
$!socket-pipe.send: $server;
return;
--
cgit v1.1