@@ -305,14 +305,16 @@ testSpawnRace TestTransport{..} rtable = do
305305 wrapEP e =
306306 e { NT.connect = \x y z -> do
307307 healthy <- newIORef True
308− fmap (fmap $ wrapConnection healthy) $ NT.connect e x y z
308+ fmap (fmap $ wrapConnection healthy e x) $ NT.connect e x y z
309309 }
310310
311− wrapConnection :: IORef Bool -> NT.Connection -> NT.Connection
312− wrapConnection healthy (NT.Connection s closeC) =
311+ wrapConnection :: IORef Bool -> NT.EndPoint -> NT.EndPointAddress
312+ -> NT.Connection -> NT.Connection
313+ wrapConnection healthy e remoteAddr (NT.Connection s closeC) =
313314 flip NT.Connection closeC $ \msg -> do
314315 when (msg == messageToPayload (createMessage ())) $ do
315316 writeIORef healthy False
317+ testBreakConnection (NT.address e) remoteAddr
316318 isHealthy <- readIORef healthy
317319 if isHealthy then s msg
318320 else return $ Left $ NT.TransportError NT.SendFailed ""