Remove the client from the table when it is unblocked for reasons * different than timing out. */
| 123 | /* Remove the client from the table when it is unblocked for reasons |
| 124 | * different than timing out. */ |
| 125 | void removeClientFromTimeoutTable(client *c) { |
| 126 | if (!(c->flags & CLIENT_IN_TO_TABLE)) return; |
| 127 | c->flags &= ~CLIENT_IN_TO_TABLE; |
| 128 | uint64_t timeout = c->bpop.timeout; |
| 129 | unsigned char buf[CLIENT_ST_KEYLEN]; |
| 130 | encodeTimeoutKey(buf,timeout,c); |
| 131 | raxRemove(server.clients_timeout_table,buf,sizeof(buf),NULL); |
| 132 | } |
| 133 | |
| 134 | /* This function is called in beforeSleep() in order to unblock clients |
| 135 | * that are waiting in blocking operations with a timeout set. */ |
no test coverage detected