|  | @@ -18,6 +18,7 @@ namespace JLHHJSvr
 | 
												
													
														
															|  |      partial class JLHHJSvr : ServiceBase
 |  |      partial class JLHHJSvr : ServiceBase
 | 
												
													
														
															|  |      {
 |  |      {
 | 
												
													
														
															|  |          private TcpListener _tcpListener = null;
 |  |          private TcpListener _tcpListener = null;
 | 
												
													
														
															|  | 
 |  | +        private LJHttpServer _httpSvr = null;
 | 
												
													
														
															|  |          private static bool running = false;
 |  |          private static bool running = false;
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |          public JLHHJSvr()
 |  |          public JLHHJSvr()
 | 
												
											
												
													
														
															|  | @@ -95,15 +96,19 @@ namespace JLHHJSvr
 | 
												
													
														
															|  |          protected override void OnStop()
 |  |          protected override void OnStop()
 | 
												
													
														
															|  |          {
 |  |          {
 | 
												
													
														
															|  |              running = false;
 |  |              running = false;
 | 
												
													
														
															|  | 
 |  | +            if (_httpSvr != null)
 | 
												
													
														
															|  | 
 |  | +            {
 | 
												
													
														
															|  | 
 |  | +                _httpSvr.Stop();
 | 
												
													
														
															|  | 
 |  | +            }
 | 
												
													
														
															|  |          }
 |  |          }
 | 
												
													
														
															|  |          private void startHttpListener(int port)
 |  |          private void startHttpListener(int port)
 | 
												
													
														
															|  |          {
 |  |          {
 | 
												
													
														
															|  |  #if DEBUG
 |  |  #if DEBUG
 | 
												
													
														
															|  | -            var httpServer = new SimpleHttpServer(port, GlobalVar.server, new GlobalVar.ParkFileModel());
 |  | 
 | 
												
													
														
															|  | 
 |  | +            _httpSvr = new SimpleHttpServer(port, GlobalVar.server, new GlobalVar.ParkFileModel());
 | 
												
													
														
															|  |  #else
 |  |  #else
 | 
												
													
														
															|  | -            var httpServer = new SimpleHttpServer(port, GlobalVar.server, new GlobalVar.ParkFileModel());
 |  | 
 | 
												
													
														
															|  | 
 |  | +            _httpSvr = new SimpleHttpServer(port, GlobalVar.server, new GlobalVar.ParkFileModel());
 | 
												
													
														
															|  |  #endif
 |  |  #endif
 | 
												
													
														
															|  | -            httpServer.Listen();
 |  | 
 | 
												
													
														
															|  | 
 |  | +            _httpSvr.Listen();
 | 
												
													
														
															|  |          }
 |  |          }
 | 
												
													
														
															|  |      }
 |  |      }
 | 
												
													
														
															|  |  }
 |  |  }
 |