Solved:
It was a simple solution in the end.
bool MySqlConn::CloseDBConnection()
{
try
{
this->con->close();
delete this->con;
this->driver->threadEnd();
return true;
}
catch(sql::SQLException &e)
{
CLogger::LogEvent("Failed To Close Connection to DataBase Server" ,e.what());
return false;
}
}
Now the Connection goes to TIME_WAIT from ESTABLISHED , which means that the connection has been terminated from this end and its waiting for any corrupted frame to be resend from the other end. And after the WAIT time is over the TCP Connection is terminated.
Regards
Gencoide_Hoax