From 3f3490db8adfc7e83ab7a0c44e7337f174114535 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 17 Jun 2005 14:27:27 +0000 Subject: [PATCH] regex to determine unix-ocity for the socket git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@344 9efc2488-bf62-4759-914b-345cdb29e865 --- src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm b/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm index 67d36b5..de0554d 100644 --- a/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm +++ b/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm @@ -452,7 +452,9 @@ sub initialize { XML my $sock_type = 'IO::Socket::INET'; - unless ($port > 0) { + + # if port is a string, then we're connecting to a UNIX socket + unless( $port =~ /^\d+$/ ) { $sock_type = 'IO::Socket::UNIX'; } -- 2.11.0