mirror of
				https://github.com/LonamiWebs/Telethon.git
				synced 2025-10-31 16:07:44 +03:00 
			
		
		
		
	Fix BrokenPipeError was instance of OSError
This commit is contained in:
		
							parent
							
								
									4a8e5c865a
								
							
						
					
					
						commit
						9dfb5d493c
					
				|  | @ -90,13 +90,13 @@ class TcpClient: | |||
|             self._socket.sendall(data) | ||||
|         except socket.timeout as e: | ||||
|             raise TimeoutError() from e | ||||
|         except BrokenPipeError: | ||||
|             self._raise_connection_reset() | ||||
|         except OSError as e: | ||||
|             if e.errno == errno.EBADF: | ||||
|                 self._raise_connection_reset() | ||||
|             else: | ||||
|                 raise | ||||
|         except BrokenPipeError: | ||||
|             self._raise_connection_reset() | ||||
| 
 | ||||
|     def read(self, size): | ||||
|         """Reads (receives) a whole block of 'size bytes | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user