[Slim-Checkins] r11451 - /branches/6.5/server/Slim/Networking/UPnP/ControlPoint.pm
andy at svn.slimdevices.com
andy at svn.slimdevices.com
Thu Feb 15 13:49:52 PST 2007
Author: andy
Date: Thu Feb 15 13:49:52 2007
New Revision: 11451
URL: http://svn.slimdevices.com?rev=11451&view=rev
Log:
Drop the use of SIGALRM when recv'ing from the UPnP socket
Modified:
branches/6.5/server/Slim/Networking/UPnP/ControlPoint.pm
Modified: branches/6.5/server/Slim/Networking/UPnP/ControlPoint.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Networking/UPnP/ControlPoint.pm?rev=11451&r1=11450&r2=11451&view=diff
==============================================================================
--- branches/6.5/server/Slim/Networking/UPnP/ControlPoint.pm (original)
+++ branches/6.5/server/Slim/Networking/UPnP/ControlPoint.pm Thu Feb 15 13:49:52 2007
@@ -99,15 +99,11 @@
my $sock = shift;
my $ssdp_res_msg;
-
- eval {
- local $SIG{ALRM} = sub { die "recv timed out"; };
- alarm 1;
- $sock->recv( $ssdp_res_msg, 4096 ) or die "recv failed: $!";
- alarm 0;
- };
- if ( $@ ) {
- msg("UPnP: Read search result failed: $@\n");
+
+ my $addr = recv( $sock, $ssdp_res_msg, 4096, 0 );
+
+ if ( !defined $addr ) {
+ msg("UPnP: Read search result failed: $!\n");
return;
}
More information about the checkins
mailing list