ndn-handle: fix initial credit of write-handle
Change-Id: Ic99bff0e97274a4bf09414d3565c01312fc2e30b
diff --git a/ndn-handle/write-handle.cpp b/ndn-handle/write-handle.cpp
index eba46c5..3b1d048 100644
--- a/ndn-handle/write-handle.cpp
+++ b/ndn-handle/write-handle.cpp
@@ -203,7 +203,7 @@
if (parameter.hasEndBlockId()) {
initialCredit =
- std::min(initialCredit, parameter.getEndBlockId() - parameter.getStartBlockId());
+ std::min(initialCredit, parameter.getEndBlockId() - parameter.getStartBlockId() + 1);
}
else {
// set noEndTimeout timer