@@ -26,9 +26,6 @@ void query_failed(GLua::ILuaInterface* lua, Connection* state) {
26
26
}
27
27
28
28
auto query = std::move (*state->query );
29
- lua->Msg (" [async_postgres] query failed: current query %d\n " ,
30
- state->query .has_value ());
31
-
32
29
state->query .reset ();
33
30
34
31
if (query.callback ) {
@@ -118,7 +115,7 @@ void process_result(GLua::ILuaInterface* lua, Connection* state,
118
115
119
116
void async_postgres::process_query (GLua::ILuaInterface* lua,
120
117
Connection* state) {
121
- if (!state->query || state-> reset_event ) {
118
+ if (!state->query ) {
122
119
// no queries to process
123
120
// don't process queries while reconnecting
124
121
return ;
@@ -135,10 +132,14 @@ void async_postgres::process_query(GLua::ILuaInterface* lua,
135
132
query.flushed = PQflush (state->conn .get ()) == 0 ;
136
133
}
137
134
138
- if (!poll_query (state->conn .get (), query)) {
139
- query_failed (lua, state);
140
- return process_query (lua, state);
141
- }
135
+ // if (!poll_query(state->conn.get(), query)) {
136
+ // query_failed(lua, state);
137
+ // return process_query(lua, state);
138
+ // }
139
+
140
+ // probably failed poll should not result
141
+ // in query failure
142
+ poll_query (state->conn .get (), query);
142
143
143
144
// ensure that getting result won't block
144
145
if (!pg::isBusy (state->conn )) {
0 commit comments