Return the currently selected server
()
| 1930 | |
| 1931 | // Return the currently selected server |
| 1932 | func (nc *Conn) currentServer() (int, *Server) { |
| 1933 | for i, s := range nc.srvPool { |
| 1934 | if s == nil { |
| 1935 | continue |
| 1936 | } |
| 1937 | if s == nc.current { |
| 1938 | return i, s |
| 1939 | } |
| 1940 | } |
| 1941 | return -1, nil |
| 1942 | } |
| 1943 | |
| 1944 | // Pop the current server and put onto the end of the list. Select head of list as long |
| 1945 | // as number of reconnect attempts under MaxReconnect. |
no outgoing calls
no test coverage detected