Permalink
Browse files

Checking in changes prior to tagging of version 0.15.

Changelog diff is:
  • Loading branch information...
1 parent ef6e2a9 commit 9ddda67de470237ac6700b0621f11a7e03d2a43f @typester committed Dec 8, 2011
Showing with 17 additions and 0 deletions.
  1. +1 −0 MANIFEST
  2. +16 −0 t/disconnect.t
View
@@ -16,6 +16,7 @@ inc/Test/Base.pm
inc/Test/Base/Filter.pm
inc/Test/Builder.pm
inc/Test/Builder/Module.pm
+inc/Test/Exception.pm
inc/Test/More.pm
inc/Test/TCP.pm
lib/AnyEvent/JSONRPC/Lite.pm
View
@@ -12,6 +12,8 @@ my $port = empty_port;
my $state = 'initial';
my $handle;
+my $ready = AnyEvent->condvar;
+
my $server = tcp_server undef, $port, sub {
my ($fh) = @_ or die $!;
@@ -28,11 +30,25 @@ my $server = tcp_server undef, $port, sub {
},
on_read => sub { },
);
+}, sub {
+ my $t; $t = AnyEvent->timer(
+ after => 1,
+ cb => sub {
+ $ready->send;
+ undef $t;
+ },
+ );
};
+$ready->recv;
+
{
my $client = jsonrpc_client '127.0.0.1', $port;
# disconnect soon after leaving this scope
+
+ my $sleep = AnyEvent->condvar;
+ my $t; $t = AnyEvent->timer( after => 1, cb => sub { $sleep->send });
+ $sleep->recv;
}
my $cv = AnyEvent->condvar;

0 comments on commit 9ddda67

Please sign in to comment.