mirror of
https://github.com/drogonframework/drogon.git
synced 2025-09-28 00:00:52 -04:00
Postgresql: don't handle events anymore after connection closing (#1499)
This commit is contained in:
parent
7d87d7e0b2
commit
ae9d5f20b3
@ -94,6 +94,10 @@ PgConnection::PgConnection(trantor::EventLoop *loop,
|
||||
exit(1);
|
||||
}
|
||||
channel_.setReadCallback([this]() {
|
||||
if (status_ == ConnectStatus::Bad)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (status_ != ConnectStatus::Ok)
|
||||
{
|
||||
pgPoll();
|
||||
|
@ -72,6 +72,10 @@ PgConnection::PgConnection(trantor::EventLoop *loop,
|
||||
exit(1);
|
||||
}
|
||||
channel_.setReadCallback([this]() {
|
||||
if (status_ == ConnectStatus::Bad)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (status_ != ConnectStatus::Ok)
|
||||
{
|
||||
pgPoll();
|
||||
|
Loading…
x
Reference in New Issue
Block a user