1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #913, use complex error for reload utc time

This commit is contained in:
winlin 2017-07-29 20:02:38 +08:00
parent 5c9a12e72a
commit 661eb8b37c
9 changed files with 86 additions and 48 deletions

View file

@ -150,7 +150,7 @@ srs_error_t SrsBufferListener::listen(string i, int p)
listener = new SrsTcpListener(this, ip, port);
if ((err = listener->listen()) != srs_success) {
return srs_error_wrap(err, "buffer tcp listen %s:%d", ip.c_str(), port);
return srs_error_wrap(err, "buffered tcp listen");
}
string v = srs_listener_type2string(type);
@ -1227,7 +1227,8 @@ srs_error_t SrsServer::fd2conn(SrsListenerType type, srs_netfd_t stfd, SrsConnec
fd, max_connections, (int)conns.size(), srs_error_desc(err).c_str());
}
if ((int)conns.size() >= max_connections) {
return srs_error_new(ERROR_EXCEED_CONNECTIONS, "drop fd=%d, max=%d, cur=%d for exceed connection limits",
return srs_error_new(ERROR_EXCEED_CONNECTIONS,
"drop fd=%d, max=%d, cur=%d for exceed connection limits",
fd, max_connections, (int)conns.size());
}
@ -1278,8 +1279,7 @@ void SrsServer::remove(ISrsConnection* c)
stat->kbps_add_delta(conn);
stat->on_disconnect(conn->srs_id());
// all connections are created by server,
// so we free it here.
// use manager to free it async.
conn_manager->remove(c);
}