Add disconnect() to Client, closes all connected conns

Signed-off-by: Pedro Melo <melo@simplicidade.org>
This commit is contained in:
Pedro Melo
2014-07-20 22:12:38 +01:00
parent 1b536cf011
commit 5142b3a15a

View File

@@ -22,6 +22,12 @@ sub new {
return $self;
}
sub disconnect {
my ($self, $cb) = @_;
$_->{conn}->disconnect($cb) for values %{ $self->{nsqd_conns} };
}
#### Argument parsing