lib/SignallingServerSelector.js
function filterAndSortAvailableServers (serverArray) {
        var copyOfServerArray = JSON.parse(JSON.stringify(serverArray));
        copyOfServerArray.sort(function (itemOne, itemTwo) {
            return sortValue(itemOne) - sortValue(itemTwo);
        });

        // Filter servers we've too-recently disconnected from
        return copyOfServerArray.filter(haveNotDisconnectedFromRecently);
    }
function filterAndSortAvailableServers (serverArray) {
        var copyOfServerArray = JSON.parse(JSON.stringify(serverArray));
        copyOfServerArray.sort(function (itemOne, itemTwo) {
            return sortValue(itemOne) - sortValue(itemTwo);
        });

        // Filter servers we've too-recently disconnected from
        return copyOfServerArray.filter(haveNotDisconnectedFromRecently);
    }
function filterAndSortAvailableServers ( serverArray ) { var copyOfServerArray = JSON . parse ( JSON . stringify ( serverArray ) ) ; copyOfServerArray . sort ( function ( itemOne , itemTwo ) { return sortValue ( itemOne ) - sortValue ( itemTwo ) ; } ) ; // Filter servers we've too-recently disconnected from return copyOfServerArray . filter ( haveNotDisconnectedFromRecently ) ; }
Return a copy of the known server array sorted in the order of
their last-disconnect-time. Due to the fact a failed connect is
considered a disconnect, this will cause servers to be tried in
a round robin pattern.
Return a copy of the known server array sorted in the order of their last - disconnect - time . Due to the fact a failed connect is considered a disconnect this will cause servers to be tried in a round robin pattern .