!1644 【bugfix】修复高并发下不能创建新连接,数据库hang住问题,合入master。

Merge pull request !1644 from li_jianqiu/cherry-pick-1648555047
This commit is contained in:
opengauss-bot 2022-03-30 01:57:00 +00:00 committed by Gitee
commit 5a6e2f6152
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 5 additions and 1 deletions

View File

@ -2306,7 +2306,11 @@ bool gs_stop_query(gsocket* gsock, uint32 remote_pid)
/* get the error information of communication layer */
const char* gs_comm_strerror()
{
return mc_strerror(errno);
bool savedVal = t_thrd.int_cxt.ImmediateInterruptOK;
t_thrd.int_cxt.ImmediateInterruptOK = false;
const char *errMsg = mc_strerror(errno);
t_thrd.int_cxt.ImmediateInterruptOK = savedVal;
return errMsg;
}
/* get communication layer stream status at receiver end as a tuple for pg_comm_stream_status */