mirror of
https://github.com/ossrs/srs.git
synced 2025-02-12 11:21:52 +00:00
For #1635, inotify watch ConfigMap for reload. 3.0.132
This commit is contained in:
parent
940798a9c7
commit
88368ed18d
2 changed files with 4 additions and 4 deletions
|
@ -539,7 +539,7 @@ srs_error_t SrsInotifyWorker::start()
|
|||
// Watch the config directory events.
|
||||
string config_dir = srs_path_dirname(_srs_config->config());
|
||||
if (true) {
|
||||
uint32_t mask = IN_MODIFY | IN_CREATE;
|
||||
uint32_t mask = IN_ALL_EVENTS;
|
||||
if (::inotify_add_watch(fd, config_dir.c_str(), mask) < 0) {
|
||||
return srs_error_new(ERROR_INOTIFY_WATCH, "watch file=%s, fd=%d, mask=%#x", config_dir.c_str(), fd, mask);
|
||||
}
|
||||
|
@ -549,7 +549,7 @@ srs_error_t SrsInotifyWorker::start()
|
|||
// Watch k8s sub directory.
|
||||
string k8s_file = config_dir + "/..data";
|
||||
if (srs_path_exists(k8s_file)) {
|
||||
uint32_t mask = IN_MODIFY;
|
||||
uint32_t mask = IN_ALL_EVENTS;
|
||||
if (::inotify_add_watch(fd, k8s_file.c_str(), mask) < 0) {
|
||||
return srs_error_new(ERROR_INOTIFY_WATCH, "watch file=%s, fd=%d, mask=%#x", k8s_file.c_str(), fd, mask);
|
||||
}
|
||||
|
@ -601,7 +601,7 @@ srs_error_t SrsInotifyWorker::cycle()
|
|||
|
||||
// Notify server to do reload.
|
||||
if (do_reload && srs_path_exists(config_path)) {
|
||||
server->on_signal(SRS_SIGNAL_RELOAD);
|
||||
//server->on_signal(SRS_SIGNAL_RELOAD);
|
||||
}
|
||||
|
||||
srs_usleep(3000 * SRS_UTIME_MILLISECONDS);
|
||||
|
|
|
@ -24,6 +24,6 @@
|
|||
#ifndef SRS_CORE_VERSION3_HPP
|
||||
#define SRS_CORE_VERSION3_HPP
|
||||
|
||||
#define SRS_VERSION3_REVISION 131
|
||||
#define SRS_VERSION3_REVISION 132
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue