[mosh-devel] [PATCH] Make errors from setsockopt( IP_MTU_DISCOVERY ) non-fatal.
Daniel Thompson
daniel at redfelineninja.org.uk
Tue Aug 30 16:28:13 EDT 2016
Currently any failure to set this option cause a fatal exception to be
thrown. This is odd because the code itself is conditionally compiled.
Fixing this the "obvious" way by showing a warning gets mosh confused
about the terminal state so we copy the same commented-out-perror
approach used a few lines later.
---
src/network/network.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/network/network.cc b/src/network/network.cc
index 69c8e8a..7089836 100644
--- a/src/network/network.cc
+++ b/src/network/network.cc
@@ -160,7 +160,7 @@ Connection::Socket::Socket( int family )
char flag = IP_PMTUDISC_DONT;
socklen_t optlen = sizeof( flag );
if ( setsockopt( _fd, IPPROTO_IP, IP_MTU_DISCOVER, &flag, optlen ) < 0 ) {
- throw NetworkException( "setsockopt", errno );
+ // perror( "setsockopt( IP_MTU_DISCOVER )" );
}
#endif
--
1.9.1
More information about the mosh-devel
mailing list