| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -133,8 +133,15 @@ namespace Apewer.Web | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        int GetPort() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            var socket = _socket; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (socket != null) return 0; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            try { if (socket.LocalEndPoint is IPEndPoint ipep) return ipep.Port; } catch { } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (socket == null) return 0; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            try | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if (socket.LocalEndPoint is IPEndPoint ipep) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    return ipep.Port; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            catch { } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            return 0; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -203,7 +210,7 @@ namespace Apewer.Web | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            catch (Exception ex) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                Shutdown(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                Logger.Web.Exception(this, ex); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                Logger.Web.Exception(ex, this); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                CatchException?.Invoke(ex); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |