File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -576,7 +576,7 @@ namespace brynet { namespace net {
576576 }
577577 if (mPostWriteCheck )
578578 {
579- CancelIoEx (HANDLE (mSocket ->getFD ()), &mOvlRecv .base );
579+ CancelIoEx (HANDLE (mSocket ->getFD ()), &mOvlSend .base );
580580 }
581581 }
582582 else
@@ -763,9 +763,13 @@ namespace brynet { namespace net {
763763 {
764764 if (!mTimer .lock () && mCheckTime != std::chrono::steady_clock::duration::zero ())
765765 {
766- auto sharedThis = shared_from_this ();
767- mTimer = mEventLoop ->getTimerMgr ()->addTimer (mCheckTime , [sharedThis]() {
768- sharedThis->PingCheck ();
766+ std::weak_ptr<DataSocket> weakedThis = shared_from_this ();
767+ mTimer = mEventLoop ->getTimerMgr ()->addTimer (mCheckTime , [weakedThis]() {
768+ auto sharedThis = weakedThis.lock ();
769+ if (sharedThis != nullptr )
770+ {
771+ sharedThis->PingCheck ();
772+ }
769773 });
770774 }
771775 }
You can’t perform that action at this time.
0 commit comments