Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 17 lines (13 sloc) 0.389 kb
0a1e88da »
2009-05-12 When receiving bad magic in the binary protocol, hang up.
1 #!/usr/bin/perl
2
3 use strict;
4 use Test::More tests => 1;
5 use FindBin qw($Bin);
6 use lib "$Bin/lib";
7 use MemcachedTest;
8
9 my $server = new_memcached('-B binary');
10 my $sock = $server->sock;
11
12 $SIG{ALRM} = sub { die "alarm\n" };
13 alarm(2);
14 print $sock "Here's a bunch of garbage that doesn't look like the bin prot.";
15 my $rv = <$sock>;
16 ok(1, "Either the above worked and quit, or hung forever.");
Something went wrong with that request. Please try again.