diff options
Diffstat (limited to 'src/Network/BitTorrent/DHT/Session.hs')
-rw-r--r-- | src/Network/BitTorrent/DHT/Session.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Network/BitTorrent/DHT/Session.hs b/src/Network/BitTorrent/DHT/Session.hs index 75d3294f..a452b764 100644 --- a/src/Network/BitTorrent/DHT/Session.hs +++ b/src/Network/BitTorrent/DHT/Session.hs | |||
@@ -264,6 +264,12 @@ instance MonadBaseControl IO (DHT ip) where | |||
264 | restoreM = DHT . restoreM . unSt | 264 | restoreM = DHT . restoreM . unSt |
265 | {-# INLINE restoreM #-} | 265 | {-# INLINE restoreM #-} |
266 | 266 | ||
267 | -- | Check is it is possible to run 'queryNode' or handle pending | ||
268 | -- query from remote node. | ||
269 | instance MonadActive (DHT ip) where | ||
270 | monadActive = getManager >>= liftIO . isActive | ||
271 | {-# INLINE monadActive #-} | ||
272 | |||
267 | -- | All allocated resources will be closed at 'stopNode'. | 273 | -- | All allocated resources will be closed at 'stopNode'. |
268 | instance MonadResource (DHT ip) where | 274 | instance MonadResource (DHT ip) where |
269 | liftResourceT m = do | 275 | liftResourceT m = do |