Created
April 23, 2010 16:55
-
-
Save griggheo/376786 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function connect_server() | |
for i = 1, #proxy.global.backends do | |
local s = proxy.global.backends[i] | |
if s.state ~= proxy.BACKEND_STATE_DOWN then | |
proxy.connection.backend_ndx = i | |
-- print ("connecting to " .. i) | |
return | |
end | |
end | |
end | |
function read_query(packet) | |
for i = 1, #proxy.global.backends do | |
local s = proxy.global.backends[i] | |
if s.state ~= proxy.BACKEND_STATE_DOWN then | |
proxy.connection.backend_ndx = i | |
-- print ("connecting to " .. i) | |
return | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment