mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 03:31:45 +08:00
直接打印SockException类
This commit is contained in:
@@ -966,7 +966,7 @@ void installWebApi() {
|
||||
//开始推流,如果推流失败或者推流中止,将会自动重试若干次,默认一直重试
|
||||
pusher->setPushCallbackOnce([cb, key, url](const SockException &ex) {
|
||||
if (ex) {
|
||||
WarnL << "Push " << url << " failed, key: " << key << ", err: " << ex.what();
|
||||
WarnL << "Push " << url << " failed, key: " << key << ", err: " << ex;
|
||||
lock_guard<recursive_mutex> lck(s_proxyPusherMapMtx);
|
||||
s_proxyPusherMap.erase(key);
|
||||
}
|
||||
@@ -975,7 +975,7 @@ void installWebApi() {
|
||||
|
||||
//被主动关闭推流
|
||||
pusher->setOnClose([key, url](const SockException &ex) {
|
||||
WarnL << "Push " << url << " failed, key: " << key << ", err: " << ex.what();
|
||||
WarnL << "Push " << url << " failed, key: " << key << ", err: " << ex;
|
||||
lock_guard<recursive_mutex> lck(s_proxyPusherMapMtx);
|
||||
s_proxyPusherMap.erase(key);
|
||||
});
|
||||
|
||||
@@ -96,7 +96,7 @@ static onceToken token([]() {
|
||||
static void parse_http_response(const SockException &ex, const Parser &res, const function<void(const Value &, const string &, bool)> &fun) {
|
||||
bool should_retry = true;
|
||||
if (ex) {
|
||||
auto errStr = StrPrinter << "[network err]:" << ex.what() << endl;
|
||||
auto errStr = StrPrinter << "[network err]:" << ex << endl;
|
||||
fun(Json::nullValue, errStr, should_retry);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user