Skip to content

Commit ec3920d

Browse files
authored
Reset wait times when checked out successfully (#656)
1 parent 4c5498b commit ec3920d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/stats/client.rs

+2
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ impl ClientStats {
109109
/// Reports a client is done querying the server and is no longer assigned a server connection
110110
pub fn idle(&self) {
111111
self.state.store(ClientState::Idle, Ordering::Relaxed);
112+
self.wait_start.store(0, Ordering::Relaxed);
112113
}
113114

114115
/// Reports a client is waiting for a connection
@@ -124,6 +125,7 @@ impl ClientStats {
124125
/// Reports a client is done waiting for a connection and is about to query the server.
125126
pub fn active(&self) {
126127
self.state.store(ClientState::Active, Ordering::Relaxed);
128+
self.wait_start.store(0, Ordering::Relaxed);
127129
}
128130

129131
/// Reports a client has failed to obtain a connection from a connection pool

0 commit comments

Comments
 (0)