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