func (p *Peer) getActiveConn() (*Connection, bool) {
	p.RLock()
	conn, ok := p.getActiveConnLocked()
	p.RUnlock()

	return conn, ok
}
func (p *Peer) getActiveConn() (*Connection, bool) {
	p.RLock()
	conn, ok := p.getActiveConnLocked()
	p.RUnlock()

	return conn, ok
}
func ( p * Peer ) getActiveConn ( ) ( * Connection , bool ) { p . RLock ( ) conn , ok := p . getActiveConnLocked ( ) p . RUnlock ( ) return conn , ok }
// getActiveConn will randomly select an active connection.
// TODO(prashant): Should we clear inactive connections?
// TODO(prashant): Do we want some sort of scoring for connections?
getActiveConn will randomly select an active connection . TODO ( prashant ) : Should we clear inactive connections? TODO ( prashant ) : Do we want some sort of scoring for connections?