improve warning on connection loss
This commit is contained in:
		
					parent
					
						
							
								9c5c24aa0a
							
						
					
				
			
			
				commit
				
					
						ca1bcdcd7c
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -132,7 +132,7 @@ runProto' a (OpenConnection conn) = do
 | 
				
			||||||
	-- so close it.
 | 
						-- so close it.
 | 
				
			||||||
	case v of
 | 
						case v of
 | 
				
			||||||
		Left e -> do
 | 
							Left e -> do
 | 
				
			||||||
			warning e
 | 
								warning $ "Lost connection to peer (" ++ e ++ ")"
 | 
				
			||||||
			liftIO $ closeConnection conn
 | 
								liftIO $ closeConnection conn
 | 
				
			||||||
			return (ClosedConnection, Nothing)
 | 
								return (ClosedConnection, Nothing)
 | 
				
			||||||
		Right r -> return (OpenConnection conn, Just r)
 | 
							Right r -> return (OpenConnection conn, Just r)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue