Переглянути джерело

channel: use convenience function

draoi 2 роки тому
батько
коміт
deb784d68d
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      src/net/channel.rs

+ 1 - 1
src/net/channel.rs

@@ -150,7 +150,7 @@ impl Channel {
     pub async fn subscribe_stop(&self) -> Result<Subscription<Error>> {
     pub async fn subscribe_stop(&self) -> Result<Subscription<Error>> {
         debug!(target: "net::channel::subscribe_stop()", "START {:?}", self);
         debug!(target: "net::channel::subscribe_stop()", "START {:?}", self);
 
 
-        if self.stopped.load(SeqCst) {
+        if self.is_stopped() {
             return Err(Error::ChannelStopped)
             return Err(Error::ChannelStopped)
         }
         }