- Remove the connection from re-usable pool when unexpected and unsolicited data detected on it Signed-off-by: Yanrui Ma <yanrui.ma@lexisnexisrisk.com>
@@ -368,6 +368,12 @@ public:
if (!ignore)
m_notify->notifySelected(sock, selected, this, reachedQuota);
}
+ else
+ {
+ PERSILOG(PersistentLogLevel::PLogNormal, "PERSISTENT: Unexpected data received on connection %d, so discard the connection.", sock->OShandle());
+ remove(sock);
+ }
+
return false;