From 9442384755121b8dfca9cbad1a07bfc6d7abedab Mon Sep 17 00:00:00 2001 From: YuQing <384681@qq.com> Date: Thu, 26 Dec 2019 11:01:58 +0800 Subject: [PATCH] log more info when send timeout --- storage/storage_nio.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/storage/storage_nio.c b/storage/storage_nio.c index b4b04d6..0b672f0 100644 --- a/storage/storage_nio.c +++ b/storage/storage_nio.c @@ -444,8 +444,10 @@ static void client_sock_write(int sock, short event, void *arg) if (event & IOEVENT_TIMEOUT) { - logError("file: "__FILE__", line: %d, " \ - "send timeout", __LINE__); + logError("file: "__FILE__", line: %d, " + "client ip: %s, send timeout, offset: %d, " + "remain bytes: %d", __LINE__, pTask->client_ip, + pTask->offset, pTask->length - pTask->offset); task_finish_clean_up(pTask); return; @@ -453,7 +455,7 @@ static void client_sock_write(int sock, short event, void *arg) if (event & IOEVENT_ERROR) { - logDebug("file: "__FILE__", line: %d, " \ + logDebug("file: "__FILE__", line: %d, " "client ip: %s, recv error event: %d, " "close connection", __LINE__, pTask->client_ip, event);