Mercurial Hosting > luan
diff src/luan/modules/host/Hosting.luan @ 1120:e8fc6712b468
luan Rpc uses luan.lib.rpc
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 07 Aug 2017 23:50:52 -0600 |
parents | bae2d0c2576c |
children | ae2321a09723 |
line wrap: on
line diff
--- a/src/luan/modules/host/Hosting.luan Mon Aug 07 12:35:45 2017 -0600 +++ b/src/luan/modules/host/Hosting.luan Mon Aug 07 23:50:52 2017 -0600 @@ -59,26 +59,34 @@ process( nil, tree, my_dir ) host.update_handler(domain,password) + host.close() end function Hosting.delete(domain,password) local host = Rpc.remote(domain) host.delete(domain,password) + host.close() end function Hosting.exists(domain) local host = Rpc.remote(domain) - return host.exists(domain) + local rtn = host.exists(domain) + host.close() + return rtn end function Hosting.change_domain(old_domain,new_domain,password) local host = Rpc.remote(new_domain) - return host.change_domain(old_domain,new_domain,password) + local rtn = host.change_domain(old_domain,new_domain,password) + host.close() + return rtn end function Hosting.change_password(domain,old_password,new_password) local host = Rpc.remote(domain) - return host.change_password(domain,old_password,new_password) + local rtn = host.change_password(domain,old_password,new_password) + host.close() + return rtn end function Hosting.caller(domain) @@ -86,6 +94,9 @@ local mt = {} function mt.__index(_,key) return function(...) + if key == "close" then + return host.close() + end return host.call(domain,key,...) end end