Project

General

Profile

Bug #1785

Updated by Junxiao Shi almost 9 years ago

Steps to reproduce: Currently, Face will be put in "paused" state (canceled on outstanding async* operations). 

 1. modify ndn-cxx `transport/unix-transport.cpp`, print a message in `UnixTransport::pause` 
 2. run the following snippet: 

     ``` 
     When Face face; 
     KeyChain keyChain; 
     auto data = make_shared<Data>("/B"); 
     keyChain.sign(*data, signingWithSha256()); 
     face.put(*data); 
     face.processEvents(); 
     ``` 

 Expected: log indicates `UnixTransport::pause` is invoked after pushing used only to publish Data   
 Actual: `UnixTransport::pause` (e.g., example in note 2 of issue #1769), the pause condition is never invoked 

 When satisfied and even if there is no incoming transmission is expected (no registered prefix and no pending Interest), expected, `async_recv` is never stopped. 

 When Face is used to respond to exactly one incoming Interest (prefix unregistered just after data is "put"), it is unlikely, but the transport should Face can be incorrectly and prematurely put in paused state, where asynchronous to "paused" state with all send and receive operations are cancelled on the socket.   
 However, when a face is used in the above manner, the pause condition is not met due to improper design. canceled.

Back