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:
1 parent
5142b3a15a
commit
3c1a9a3083
1 file changed
+6
@@ -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