Skip to content

Commit fdf8ff2

Browse files
committed
forgot to add to msg queue + remove the annoying popup
1 parent 4ca1127 commit fdf8ff2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Utils/DemonList.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@ class $modify(LevelInfoLayer) {
161161
loading_circle->fadeAndRemove();
162162
}
163163
log::error("Error while sending a request to Demon List: {}", error);
164-
FLAlertLayer::create(nullptr,
164+
/*FLAlertLayer::create(nullptr,
165165
"Error",
166166
"Failed to make a request to <cy>Demon List</c>. Please either <cg>try again later</c>, look at the error logs to see what might have happened, or report this to the developers.",
167167
"OK",
168168
nullptr,
169169
350.0F
170-
)->show();
170+
)->show();*/
171171
this->release();
172172
};
173173

src/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ class AMQT {
192192
//struct timeval timeout = {1, 0};
193193
auto ret = amqp_consume_message(m_connection, &envelope, NULL, 0);
194194
if (AMQP_RESPONSE_NORMAL != ret.reply_type) {
195+
log::error("Response wasn't normal! {}", AMQErrorToString(ret));
195196
if (AMQP_RESPONSE_LIBRARY_EXCEPTION == ret.reply_type && AMQP_STATUS_UNEXPECTED_STATE == ret.library_error) {
196197
amqp_frame_t frame;
197198
if (AMQP_STATUS_OK != amqp_simple_wait_frame(m_connection, &frame)) {
@@ -202,12 +203,15 @@ class AMQT {
202203
if (frame.payload.method.id == AMQP_BASIC_ACK_METHOD) continue;
203204
if (frame.payload.method.id == AMQP_BASIC_RETURN_METHOD) {
204205
{
206+
log::info("Got frame payload, re-reading message based on channel...");
205207
amqp_message_t message;
206208
ret = amqp_read_message(m_connection, frame.channel, &message, 0);
207209
if (AMQP_RESPONSE_NORMAL != ret.reply_type) {
208210
log::error("Error reading returned message: {}", AMQErrorToString(ret));
209211
break;
210212
}
213+
std::string data((char*)message.body.bytes, message.body.len);
214+
msgQueue.push(data);
211215
amqp_destroy_message(&message);
212216
}
213217
continue;

0 commit comments

Comments
 (0)