improve warning on connection loss

This commit is contained in:
Joey Hess 2016-12-09 12:35:45 -04:00
parent 9c5c24aa0a
commit ca1bcdcd7c
No known key found for this signature in database
GPG key ID: C910D9222512E3C7

View file

@ -132,7 +132,7 @@ runProto' a (OpenConnection conn) = do
-- so close it.
case v of
Left e -> do
warning e
warning $ "Lost connection to peer (" ++ e ++ ")"
liftIO $ closeConnection conn
return (ClosedConnection, Nothing)
Right r -> return (OpenConnection conn, Just r)