Quellcode durchsuchen

Merge #642

642: fix return value of `nagle_enable` r=Dirbaio a=stlankes

The old implementation returns the wrong value (ACK delay duration) and doesn't describe if the Nagle algorithm is enabled or not.

Co-authored-by: Stefan Lankes <slankes@eonerc.rwth-aachen.de>
bors[bot] vor 2 Jahren
Ursprung
Commit
4db073f373
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      src/socket/tcp.rs

+ 2 - 2
src/socket/tcp.rs

@@ -541,8 +541,8 @@ impl<'a> Socket<'a> {
     /// Return whether Nagle's Algorithm is enabled.
     ///
     /// See also the [set_nagle_enabled](#method.set_nagle_enabled) method.
-    pub fn nagle_enabled(&self) -> Option<Duration> {
-        self.ack_delay
+    pub fn nagle_enabled(&self) -> bool {
+        self.nagle
     }
 
     /// Return the current window field value, including scaling according to RFC 1323.