mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-08-21 06:12:43 -06:00
fix crash server status frame
This commit is contained in:
parent
a12676df94
commit
3a9372c45f
2 changed files with 22 additions and 19 deletions
Binary file not shown.
|
|
@ -2310,25 +2310,28 @@ void frmStatus::OnRefresh(wxCommandEvent &event)
|
|||
|
||||
void frmStatus::checkConnection()
|
||||
{
|
||||
if (!locks_connection->IsAlive())
|
||||
{
|
||||
locks_connection = connection;
|
||||
}
|
||||
if (!connection->IsAlive())
|
||||
{
|
||||
delete connection;
|
||||
connection = 0;
|
||||
statusTimer->Stop();
|
||||
locksTimer->Stop();
|
||||
if (xactTimer)
|
||||
xactTimer->Stop();
|
||||
if (logTimer)
|
||||
logTimer->Stop();
|
||||
if (querystateTimer)
|
||||
querystateTimer->Stop();
|
||||
actionMenu->Enable(MNU_REFRESH, false);
|
||||
toolBar->EnableTool(MNU_REFRESH, false);
|
||||
statusBar->SetStatusText(_("Connection broken."));
|
||||
if (connection) {
|
||||
if (!locks_connection->IsAlive())
|
||||
{
|
||||
locks_connection = connection;
|
||||
}
|
||||
if (!connection->IsAlive())
|
||||
{
|
||||
if (locks_connection==connection) locks_connection = 0;
|
||||
delete connection;
|
||||
connection = 0;
|
||||
statusTimer->Stop();
|
||||
locksTimer->Stop();
|
||||
if (xactTimer)
|
||||
xactTimer->Stop();
|
||||
if (logTimer)
|
||||
logTimer->Stop();
|
||||
if (querystateTimer)
|
||||
querystateTimer->Stop();
|
||||
actionMenu->Enable(MNU_REFRESH, false);
|
||||
toolBar->EnableTool(MNU_REFRESH, false);
|
||||
statusBar->SetStatusText(_("Connection broken."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue