diff --git a/src/Player/PlayerProxy.cpp b/src/Player/PlayerProxy.cpp index 19c892aa..688befc2 100644 --- a/src/Player/PlayerProxy.cpp +++ b/src/Player/PlayerProxy.cpp @@ -121,6 +121,11 @@ void PlayerProxy::setDirectProxy() { PlayerProxy::~PlayerProxy() { _timer.reset(); + // 避免析构时, 忘记回调api请求 + if(_on_play) { + _on_play(SockException(Err_shutdown, "player proxy close")); + _on_play = nullptr; + } } void PlayerProxy::rePlay(const string &strUrl, int iFailedCnt) {