termux-packages/packages/redis/networking.c.patch

23 lines
982 B
Diff

diff -uNr redis-6.0.9/src/networking.c redis-6.0.9.mod/src/networking.c
--- redis-6.0.9/src/networking.c 2020-10-27 07:12:01.000000000 +0000
+++ redis-6.0.9.mod/src/networking.c 2020-11-22 17:06:47.317043042 +0000
@@ -3082,16 +3082,8 @@
int err, j;
for (j = 0; j < server.io_threads_num; j++) {
if (io_threads[j] == pthread_self()) continue;
- if (io_threads[j] && pthread_cancel(io_threads[j]) == 0) {
- if ((err = pthread_join(io_threads[j],NULL)) != 0) {
- serverLog(LL_WARNING,
- "IO thread(tid:%lu) can not be joined: %s",
- (unsigned long)io_threads[j], strerror(err));
- } else {
- serverLog(LL_WARNING,
- "IO thread(tid:%lu) terminated",(unsigned long)io_threads[j]);
- }
- }
+ pthread_kill(io_threads[j], 0);
+ serverLog(LL_WARNING, "IO thread(tid:%lu) terminated",(unsigned long)io_threads[j]);
}
}