Skip to content

Commit

Permalink
Don't use uninitialized $!socket during debug
Browse files Browse the repository at this point in the history
  • Loading branch information
softmoth committed Jun 13, 2014
1 parent 1b7a128 commit da7f55d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions lib/SCGI.pm6
Expand Up @@ -46,11 +46,18 @@ method accept ()
method handle (&closure)
{
if ($.debug) {
$*ERR.say: "socket family is "~$.socket.family;
$*ERR.say: "socket proto is "~$.socket.proto;
$*ERR.say: "socket type is "~$.socket.type;
if $!socket
{
$*ERR.say: "socket family is "~$.socket.family;
$*ERR.say: "socket proto is "~$.socket.proto;
$*ERR.say: "socket type is "~$.socket.type;
}
else
{
$*ERR.say: "No socket yet";
}
}
$*ERR.say: "[{time}] SCGI is ready and waiting.";
$*ERR.say: "[{time}] SCGI is ready and waiting ($!addr:$!port)";
while (my $connection = self.accept)
{
if ($.debug) { $*ERR.say: "Doing the loop"; }
Expand Down

0 comments on commit da7f55d

Please sign in to comment.