Skip to content

Commit 5c06e06

Browse files
committed
Update trantor version to v1.0.0-rc7
1 parent ac76712 commit 5c06e06

File tree

5 files changed

+26
-18
lines changed

5 files changed

+26
-18
lines changed

ChangeLog.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.
33

44
## [Unreleased]
55

6+
## [1.0.0-rc7] - 2019-11-21
7+
8+
### Changed
9+
10+
- Modify some code styles
11+
612
## [1.0.0-rc6] - 2019-10-4
713

814
### API change list
@@ -67,7 +73,9 @@ All notable changes to this project will be documented in this file.
6773

6874
## [1.0.0-rc1] - 2019-06-11
6975

70-
[Unreleased]: https://github.com/an-tao/trantor/compare/v1.0.0-rc6...HEAD
76+
[Unreleased]: https://github.com/an-tao/trantor/compare/v1.0.0-rc7...HEAD
77+
78+
[1.0.0-rc6]: https://github.com/an-tao/trantor/compare/v1.0.0-rc6...v1.0.0-rc7
7179

7280
[1.0.0-rc6]: https://github.com/an-tao/trantor/compare/v1.0.0-rc5...v1.0.0-rc6
7381

trantor/net/TcpServer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ void TcpServer::start()
131131
idleTimeout_ < 500
132132
? idleTimeout_ + 1
133133
: 100);
134-
loopNum--;
134+
--loopNum;
135135
}
136136
}
137137
}

trantor/net/inner/TcpConnectionImpl.cc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ void TcpConnectionImpl::send(const std::shared_ptr<std::string> &msgPtr)
385385
loop_->queueInLoop([thisPtr, msgPtr]() {
386386
thisPtr->sendInLoop(msgPtr->data(), msgPtr->length());
387387
std::lock_guard<std::mutex> guard1(thisPtr->sendNumMutex_);
388-
thisPtr->sendNum_--;
388+
--thisPtr->sendNum_;
389389
});
390390
}
391391
}
@@ -397,7 +397,7 @@ void TcpConnectionImpl::send(const std::shared_ptr<std::string> &msgPtr)
397397
loop_->queueInLoop([thisPtr, msgPtr]() {
398398
thisPtr->sendInLoop(msgPtr->data(), msgPtr->length());
399399
std::lock_guard<std::mutex> guard1(thisPtr->sendNumMutex_);
400-
thisPtr->sendNum_--;
400+
--thisPtr->sendNum_;
401401
});
402402
}
403403
}
@@ -418,7 +418,7 @@ void TcpConnectionImpl::send(const char *msg, uint64_t len)
418418
loop_->queueInLoop([thisPtr, buffer]() {
419419
thisPtr->sendInLoop(buffer->data(), buffer->length());
420420
std::lock_guard<std::mutex> guard1(thisPtr->sendNumMutex_);
421-
thisPtr->sendNum_--;
421+
--thisPtr->sendNum_;
422422
});
423423
}
424424
}
@@ -431,7 +431,7 @@ void TcpConnectionImpl::send(const char *msg, uint64_t len)
431431
loop_->queueInLoop([thisPtr, buffer]() {
432432
thisPtr->sendInLoop(buffer->data(), buffer->length());
433433
std::lock_guard<std::mutex> guard1(thisPtr->sendNumMutex_);
434-
thisPtr->sendNum_--;
434+
--thisPtr->sendNum_;
435435
});
436436
}
437437
}
@@ -451,7 +451,7 @@ void TcpConnectionImpl::send(const std::string &msg)
451451
loop_->queueInLoop([thisPtr, msg]() {
452452
thisPtr->sendInLoop(msg.data(), msg.length());
453453
std::lock_guard<std::mutex> guard1(thisPtr->sendNumMutex_);
454-
thisPtr->sendNum_--;
454+
--thisPtr->sendNum_;
455455
});
456456
}
457457
}
@@ -463,7 +463,7 @@ void TcpConnectionImpl::send(const std::string &msg)
463463
loop_->queueInLoop([thisPtr, msg]() {
464464
thisPtr->sendInLoop(msg.data(), msg.length());
465465
std::lock_guard<std::mutex> guard1(thisPtr->sendNumMutex_);
466-
thisPtr->sendNum_--;
466+
--thisPtr->sendNum_;
467467
});
468468
}
469469
}
@@ -483,7 +483,7 @@ void TcpConnectionImpl::send(std::string &&msg)
483483
loop_->queueInLoop([thisPtr, msg = std::move(msg)]() {
484484
thisPtr->sendInLoop(msg.data(), msg.length());
485485
std::lock_guard<std::mutex> guard1(thisPtr->sendNumMutex_);
486-
thisPtr->sendNum_--;
486+
--thisPtr->sendNum_;
487487
});
488488
}
489489
}
@@ -495,7 +495,7 @@ void TcpConnectionImpl::send(std::string &&msg)
495495
loop_->queueInLoop([thisPtr, msg = std::move(msg)]() {
496496
thisPtr->sendInLoop(msg.data(), msg.length());
497497
std::lock_guard<std::mutex> guard1(thisPtr->sendNumMutex_);
498-
thisPtr->sendNum_--;
498+
--thisPtr->sendNum_;
499499
});
500500
}
501501
}
@@ -516,7 +516,7 @@ void TcpConnectionImpl::send(const MsgBuffer &buffer)
516516
loop_->queueInLoop([thisPtr, buffer]() {
517517
thisPtr->sendInLoop(buffer.peek(), buffer.readableBytes());
518518
std::lock_guard<std::mutex> guard1(thisPtr->sendNumMutex_);
519-
thisPtr->sendNum_--;
519+
--thisPtr->sendNum_;
520520
});
521521
}
522522
}
@@ -528,7 +528,7 @@ void TcpConnectionImpl::send(const MsgBuffer &buffer)
528528
loop_->queueInLoop([thisPtr, buffer]() {
529529
thisPtr->sendInLoop(buffer.peek(), buffer.readableBytes());
530530
std::lock_guard<std::mutex> guard1(thisPtr->sendNumMutex_);
531-
thisPtr->sendNum_--;
531+
--thisPtr->sendNum_;
532532
});
533533
}
534534
}
@@ -549,7 +549,7 @@ void TcpConnectionImpl::send(MsgBuffer &&buffer)
549549
loop_->queueInLoop([thisPtr, buffer = std::move(buffer)]() {
550550
thisPtr->sendInLoop(buffer.peek(), buffer.readableBytes());
551551
std::lock_guard<std::mutex> guard1(thisPtr->sendNumMutex_);
552-
thisPtr->sendNum_--;
552+
--thisPtr->sendNum_;
553553
});
554554
}
555555
}
@@ -561,7 +561,7 @@ void TcpConnectionImpl::send(MsgBuffer &&buffer)
561561
loop_->queueInLoop([thisPtr, buffer = std::move(buffer)]() {
562562
thisPtr->sendInLoop(buffer.peek(), buffer.readableBytes());
563563
std::lock_guard<std::mutex> guard1(thisPtr->sendNumMutex_);
564-
thisPtr->sendNum_--;
564+
--thisPtr->sendNum_;
565565
});
566566
}
567567
}
@@ -622,7 +622,7 @@ void TcpConnectionImpl::sendFile(int sfd, size_t offset, size_t length)
622622
thisPtr->writeBufferList_.push_back(node);
623623
{
624624
std::lock_guard<std::mutex> guard1(thisPtr->sendNumMutex_);
625-
thisPtr->sendNum_--;
625+
--thisPtr->sendNum_;
626626
}
627627

628628
if (thisPtr->writeBufferList_.size() == 1)
@@ -643,7 +643,7 @@ void TcpConnectionImpl::sendFile(int sfd, size_t offset, size_t length)
643643

644644
{
645645
std::lock_guard<std::mutex> guard1(thisPtr->sendNumMutex_);
646-
thisPtr->sendNum_--;
646+
--thisPtr->sendNum_;
647647
}
648648

649649
if (thisPtr->writeBufferList_.size() == 1)

trantor/tests/SSLClientTest.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ int main()
3737
else
3838
{
3939
LOG_DEBUG << i << " disconnected";
40-
connCount--;
40+
--connCount;
4141
if (connCount == 0)
4242
loop.quit();
4343
}

trantor/tests/TcpClientTest.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ int main()
3636
else
3737
{
3838
LOG_DEBUG << i << " disconnected";
39-
connCount--;
39+
--connCount;
4040
if (connCount == 0)
4141
loop.quit();
4242
}

0 commit comments

Comments
 (0)