From 6c92714810fde79fa5b12155b66002c5c4f65250 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Mon, 23 Nov 2015 10:24:52 +0100 Subject: [PATCH] Socket.pm: Fix error messages when crashing. When the module crashed (died) for some reasons, the provided details where empty. Signed-off-by: Stefan Schantl --- modules/Socket.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/Socket.pm b/modules/Socket.pm index ea1c723..cdcca00 100644 --- a/modules/Socket.pm +++ b/modules/Socket.pm @@ -33,7 +33,7 @@ sub Server () { # If the path for the socketfile does not exist, try to # create it. unless (-d "$socketpath") { - mkdir("$socketpath") or die "Could not create $socketpath: $@\n"; + mkdir("$socketpath") or die "Could not create $socketpath: $!\n"; } # Delete an existing socket file. @@ -47,7 +47,7 @@ sub Server () { Local => $socketfile, Listen => SOMAXCONN, Type => SOCK_STREAM, - ) or die "Could not create socket: $@\n"; + ) or die "Could not create socket: $!\n"; # Return the server object. return $server; -- 2.39.5