Changeset 500
- Timestamp:
- Jul 29, 2024, 4:48:56 PM (4 months ago)
- Location:
- TFP-WebServer
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
TFP-WebServer/WebServer/ModInfo.xml
r499 r500 5 5 <Description value="Integrated Webserver for the Web Dashboard and server APIs" /> 6 6 <Author value="The Fun Pimps LLC" /> 7 <Version value="1.1.0. 3" />7 <Version value="1.1.0.4" /> 8 8 <Website value="" /> 9 9 </xml> -
TFP-WebServer/WebServer/src/ModApi.cs
r404 r500 12 12 public void InitMod (Mod _modInstance) { 13 13 ModEvents.GameStartDone.RegisterHandler (GameStartDone); 14 ModEvents. GameShutdown.RegisterHandler (GameShutdown);14 ModEvents.WorldShuttingDown.RegisterHandler (WorldShuttingDown); 15 15 modInstance = _modInstance; 16 16 … … 31 31 } 32 32 33 private void GameShutdown () {34 webInstance?. Shutdown();33 private void WorldShuttingDown () { 34 webInstance?.Disconnect (); 35 35 } 36 36 } -
TFP-WebServer/WebServer/src/Web.cs
r487 r500 30 30 private readonly AsyncCallback handleRequestDelegate; 31 31 32 private bool shutdown; 33 32 34 public Web (string _modInstancePath) { 33 35 try { … … 150 152 151 153 public void Disconnect () { 154 if (shutdown) { 155 return; 156 } 157 158 shutdown = true; 159 152 160 try { 161 foreach (AbsHandler handler in handlers) { 162 handler.Shutdown (); 163 } 164 153 165 listener.Stop (); 154 166 listener.Close (); 155 167 } catch (Exception e) { 156 168 Log.Out ($"[Web] Error in Web.Disconnect: {e}"); 157 }158 }159 160 public void Shutdown () {161 foreach (AbsHandler handler in handlers) {162 handler.Shutdown ();163 169 } 164 170 } -
TFP-WebServer/bin/Mods/TFP_WebServer/ModInfo.xml
r499 r500 5 5 <Description value="Integrated Webserver for the Web Dashboard and server APIs" /> 6 6 <Author value="The Fun Pimps LLC" /> 7 <Version value="1.1.0. 3" />7 <Version value="1.1.0.4" /> 8 8 <Website value="" /> 9 9 </xml>
Note:
See TracChangeset
for help on using the changeset viewer.