Project

General

Profile

Actions

Bug #1785

open

Face: transport is never paused after pushing Data

Added by Alex Afanasyev almost 10 years ago. Updated over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Base
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Steps to reproduce:

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

    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 Data

Actual: UnixTransport::pause is never invoked

When no incoming transmission is expected (no registered prefix and no pending Interest), the transport should be put in paused state, where asynchronous 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.

Actions

Also available in: Atom PDF