mirror of
				https://github.com/ton-blockchain/ton
				synced 2025-03-09 15:40:10 +00:00 
			
		
		
		
	Fix error handling in ServerSocketFd.cpp
This commit is contained in:
		
							parent
							
								
									127f5778dc
								
							
						
					
					
						commit
						b398862cf8
					
				
					 1 changed files with 3 additions and 19 deletions
				
			
		| 
						 | 
				
			
			@ -253,25 +253,9 @@ class ServerSocketFdImpl {
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    auto error = Status::PosixError(accept_errno, PSLICE() << "Accept from " << get_native_fd() << " has failed");
 | 
			
		||||
    switch (accept_errno) {
 | 
			
		||||
      case EBADF:
 | 
			
		||||
      case EFAULT:
 | 
			
		||||
      case EINVAL:
 | 
			
		||||
      case ENOTSOCK:
 | 
			
		||||
      case EOPNOTSUPP:
 | 
			
		||||
        LOG(FATAL) << error;
 | 
			
		||||
        UNREACHABLE();
 | 
			
		||||
        break;
 | 
			
		||||
      default:
 | 
			
		||||
        LOG(ERROR) << error;
 | 
			
		||||
      // fallthrough
 | 
			
		||||
      case EMFILE:
 | 
			
		||||
      case ENFILE:
 | 
			
		||||
      case ECONNABORTED:  //???
 | 
			
		||||
        get_poll_info().clear_flags(PollFlags::Read());
 | 
			
		||||
        get_poll_info().add_flags(PollFlags::Close());
 | 
			
		||||
        return std::move(error);
 | 
			
		||||
    }
 | 
			
		||||
    get_poll_info().clear_flags(PollFlags::Read());
 | 
			
		||||
    get_poll_info().add_flags(PollFlags::Close());
 | 
			
		||||
    return std::move(error);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  Status get_pending_error() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue