mirror of
https://github.com/ceph/ceph
synced 2024-12-14 15:35:45 +00:00
journal: disconnect watch after watch error
Fixes: #14168 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
parent
749c42422e
commit
a3ac03e5ae
@ -364,6 +364,13 @@ void JournalMetadata::handle_watch_error(int err) {
|
||||
lderr(m_cct) << "journal watch error: " << cpp_strerror(err) << dendl;
|
||||
Mutex::Locker timer_locker(m_timer_lock);
|
||||
Mutex::Locker locker(m_lock);
|
||||
|
||||
// release old watch on error
|
||||
if (m_watch_handle != 0) {
|
||||
m_ioctx.unwatch2(m_watch_handle);
|
||||
m_watch_handle = 0;
|
||||
}
|
||||
|
||||
if (m_initialized && err != -ENOENT) {
|
||||
schedule_watch_reset();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user