projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changes to perl/Messages from ea1dav
[spider.git]
/
perl
/
Msg.pm
diff --git
a/perl/Msg.pm
b/perl/Msg.pm
index f3dec8b1610b5743e5596b7b406bd9d9ed760304..839b5e453313e05db16f6f536ba26d3e4b1cdd31 100644
(file)
--- a/
perl/Msg.pm
+++ b/
perl/Msg.pm
@@
-135,7
+135,8
@@
sub connect {
blocking($sock, 0);
my $ip = gethostbyname($to_host);
blocking($sock, 0);
my $ip = gethostbyname($to_host);
- my $r = $sock->connect($to_port, $ip);
+# my $r = $sock->connect($to_port, $ip);
+ my $r = connect($sock, pack_sockaddr_in($to_port, $ip));
unless ($r) {
return undef unless $! == EINPROGRESS;
}
unless ($r) {
return undef unless $! == EINPROGRESS;
}
@@
-167,8
+168,6
@@
sub disconnect {
$call ||= 'unallocated';
dbg('connll', "Connection $call disconnected");
$call ||= 'unallocated';
dbg('connll', "Connection $call disconnected");
- set_event_handler ($sock, read => undef, write => undef, error => undef);
-
unless ($^O =~ /^MS/i) {
kill 'TERM', $conn->{pid} if exists $conn->{pid};
}
unless ($^O =~ /^MS/i) {
kill 'TERM', $conn->{pid} if exists $conn->{pid};
}
@@
-181,6
+180,7
@@
sub disconnect {
}
return unless defined($sock);
}
return unless defined($sock);
+ set_event_handler ($sock, read => undef, write => undef, error => undef);
shutdown($sock, 3);
close($sock);
}
shutdown($sock, 3);
close($sock);
}