Query Path MTU on every instruction because Linux is not so reliable about EMSGSIZE
This commit is contained in:
+1
-2
@@ -71,8 +71,6 @@ namespace Network {
|
|||||||
Base64Key key;
|
Base64Key key;
|
||||||
Session session;
|
Session session;
|
||||||
|
|
||||||
void update_MTU( void );
|
|
||||||
|
|
||||||
void setup( void );
|
void setup( void );
|
||||||
|
|
||||||
Direction direction;
|
Direction direction;
|
||||||
@@ -94,6 +92,7 @@ namespace Network {
|
|||||||
void send( string s );
|
void send( string s );
|
||||||
string recv( void );
|
string recv( void );
|
||||||
int fd( void ) { return sock; }
|
int fd( void ) { return sock; }
|
||||||
|
void update_MTU( void );
|
||||||
int get_MTU( void ) { return MTU; }
|
int get_MTU( void ) { return MTU; }
|
||||||
|
|
||||||
int port( void );
|
int port( void );
|
||||||
|
|||||||
@@ -246,6 +246,7 @@ void TransportSender<MyState>::send_in_fragments( string diff, uint64_t new_num
|
|||||||
shutdown_tries++;
|
shutdown_tries++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
connection->update_MTU();
|
||||||
vector<Fragment> fragments = fragmenter.make_fragments( inst, connection->get_MTU() );
|
vector<Fragment> fragments = fragmenter.make_fragments( inst, connection->get_MTU() );
|
||||||
|
|
||||||
for ( auto i = fragments.begin(); i != fragments.end(); i++ ) {
|
for ( auto i = fragments.begin(); i != fragments.end(); i++ ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user