Add private _random_connected_conn() to return one of the connect conns
Not really random at this moment... Signed-off-by: Pedro Melo <melo@simplicidade.org>
This commit is contained in:
@@ -116,6 +116,12 @@ sub _start_nsqd_connection {
|
||||
return;
|
||||
}
|
||||
|
||||
## return one connection that is connected
|
||||
sub _random_connected_conn {
|
||||
## FIXME: yeah, Sony-style random going on :)
|
||||
return (values %{ $_[0]{nsqd_conns} })[0]->{conn};
|
||||
}
|
||||
|
||||
|
||||
#### Hooks for the main states of the connection
|
||||
sub _connected {
|
||||
|
||||
Reference in New Issue
Block a user