diff options
Diffstat (limited to 'regress/usr.sbin/relayd/Client.pm')
-rw-r--r-- | regress/usr.sbin/relayd/Client.pm | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/regress/usr.sbin/relayd/Client.pm b/regress/usr.sbin/relayd/Client.pm index 37cfa40b130..97a525ad645 100644 --- a/regress/usr.sbin/relayd/Client.pm +++ b/regress/usr.sbin/relayd/Client.pm @@ -1,4 +1,4 @@ -# $OpenBSD: Client.pm,v 1.6 2014/07/09 16:48:55 reyk Exp $ +# $OpenBSD: Client.pm,v 1.7 2014/07/10 10:19:06 bluhm Exp $ # Copyright (c) 2010-2012 Alexander Bluhm <bluhm@openbsd.org> # @@ -44,10 +44,10 @@ sub new { sub child { my $self = shift; - if ($self->{mreqs}) { - print STDERR "connection per request\n"; - return; - } + # in case we redo the connect, shutdown the old one + shutdown(\*STDOUT, SHUT_WR); + delete $self->{cs}; + $SSL_ERROR = ""; my $iosocket = $self->{ssl} ? "IO::Socket::SSL" : "IO::Socket::INET6"; my $cs = $iosocket->new( @@ -59,7 +59,6 @@ sub child { ) or die ref($self), " $iosocket socket connect failed: $!,$SSL_ERROR"; print STDERR "connect sock: ",$cs->sockhost()," ",$cs->sockport(),"\n"; print STDERR "connect peer: ",$cs->peerhost()," ",$cs->peerport(),"\n"; - print STDERR "single connection\n"; *STDIN = *STDOUT = $self->{cs} = $cs; } |