Merge pull request #4971 from rgerhards/imtcp-cleanup

tcpsrv: cleanup - remove commented out code
This commit is contained in:
Rainer Gerhards 2022-08-30 15:24:53 +02:00 committed by GitHub
commit 5554170a09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -604,7 +604,6 @@ doReceive(tcpsrv_t *pThis, tcps_sess_t **ppSess, nspoll_t *pPoll)
case RS_RET_CLOSED: case RS_RET_CLOSED:
if(pThis->bEmitMsgOnClose) { if(pThis->bEmitMsgOnClose) {
errno = 0; errno = 0;
// prop.GetString((*ppSess)->fromHostIP, &pszPeer, &lenPeer);
LogError(0, RS_RET_PEER_CLOSED_CONN, "Netstream session %p closed by remote " LogError(0, RS_RET_PEER_CLOSED_CONN, "Netstream session %p closed by remote "
"peer %s.\n", (*ppSess)->pStrm, pszPeer); "peer %s.\n", (*ppSess)->pStrm, pszPeer);
} }
@ -620,13 +619,11 @@ doReceive(tcpsrv_t *pThis, tcps_sess_t **ppSess, nspoll_t *pPoll)
/* in this case, something went awfully wrong. /* in this case, something went awfully wrong.
* We are instructed to terminate the session. * We are instructed to terminate the session.
*/ */
// prop.GetString((*ppSess)->fromHostIP, &pszPeer, &lenPeer);
LogError(oserr, localRet, "Tearing down TCP Session from %s", pszPeer); LogError(oserr, localRet, "Tearing down TCP Session from %s", pszPeer);
CHKiRet(closeSess(pThis, ppSess, pPoll)); CHKiRet(closeSess(pThis, ppSess, pPoll));
} }
break; break;
default: default:
// prop.GetString((*ppSess)->fromHostIP, &pszPeer, &lenPeer);
LogError(oserr, iRet, "netstream session %p from %s will be closed due to error", LogError(oserr, iRet, "netstream session %p from %s will be closed due to error",
(*ppSess)->pStrm, pszPeer); (*ppSess)->pStrm, pszPeer);
CHKiRet(closeSess(pThis, ppSess, pPoll)); CHKiRet(closeSess(pThis, ppSess, pPoll));