Add disconnect() to Client, closes all connected conns
Signed-off-by: Pedro Melo <melo@simplicidade.org>
This commit is contained in:
1 parent
1b536cf011
commit
5142b3a15a
1 file changed
+6
@@ -22,6 +22,12 @@ sub new {
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub disconnect {
|
||||
my ($self, $cb) = @_;
|
||||
|
||||
$_->{conn}->disconnect($cb) for values %{ $self->{nsqd_conns} };
|
||||
}
|
||||
|
||||
|
||||
#### Argument parsing
|
||||
|
||||
|
||||
Reference in new issue
Block a user