Mercurial Hosting > luan
comparison src/luan/modules/http/HttpServicer.java @ 798:9eccfede1094
fix cloning bug
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 06 Sep 2016 12:23:03 -0600 |
parents | 6b8ea0a9b7c9 |
children | 9c13a15a4002 |
comparison
equal
deleted
inserted
replaced
797:86e477945676 | 798:9eccfede1094 |
---|---|
43 public static boolean service(LuanState luan,HttpServletRequest request,HttpServletResponse response,String modName) | 43 public static boolean service(LuanState luan,HttpServletRequest request,HttpServletResponse response,String modName) |
44 throws LuanException | 44 throws LuanException |
45 { | 45 { |
46 LuanFunction fn; | 46 LuanFunction fn; |
47 synchronized(luan) { | 47 synchronized(luan) { |
48 if( luan.isLocked ) { | 48 PackageLuan.enableLoad(luan,"luan:http/Http.luan",modName); |
49 if( PackageLuan.wouldLoad(luan,"luan:http/Http.luan") || PackageLuan.wouldLoad(luan,modName) ) { | |
50 luan.isLocked = false; | |
51 luan.deepenClone(luan,new LuanCloner(LuanCloner.Type.COMPLETE)); | |
52 } | |
53 } | |
54 LuanTable module = (LuanTable)PackageLuan.require(luan,"luan:http/Http.luan"); | 49 LuanTable module = (LuanTable)PackageLuan.require(luan,"luan:http/Http.luan"); |
55 LuanTable per_session_pages = (LuanTable)module.rawGet("per_session_pages"); | 50 LuanTable per_session_pages = (LuanTable)module.rawGet("per_session_pages"); |
56 Object mod = PackageLuan.load(luan,modName); | 51 Object mod = PackageLuan.load(luan,modName); |
57 if( mod==null ) | 52 if( mod==null ) |
58 return false; | 53 return false; |