My websdr crashed this morning, and wouldn't restart.
Thank you for using PhantomSDR+, you are supporting the Development of an Open-Source WebSDR Project ♥
Using OpenCL
Using OpenCL platform: Intel(R) OpenCL Graphics
Using OpenCL device: Intel(R) HD Graphics 630
Markers updated.
Waterfall is sent every 1 FFTs
terminate called after throwing an instance of 'websocketpp::exception'
what(): A payload contained invalid data
Afgebroken (geheugendump gemaakt)
Only after deleting chat.txt it would work again.
I went into the code and changed the number of chatlines from 100 to 20....let's see if it works, in src/chat.cpp
New code:
void ChatClient::store_chat_message(const std::string& message) {
if(chat_messages_history.size() >= 20) {
chat_messages_history.pop_front();
}
else
chat_messages_history.push_back(message);
save_chat_history();
}
and:
void ChatClient::load_chat_history() {
std::ifstream file("chat_history.txt");
std::string line;
while (std::getline(file, line) && chat_messages_history.size() < 20) {
chat_messages_history.push_back(line);
}
file.close();
}
Then go into build and run: ninja
As this should reduce the chat max messages to 20 instead of 100, I THINK the chat has too many characters for the websocket to cope.
With a little luck this will solve the crashing over chatting ;)
Have been testing and the code works...
Maybe you want to keep 100 lines....then only insert ELSE like in the first code and run ninja.
Because the ELSE was missing, it kept growing ;D
I like the idea of only 20 lines of chat. Thanks Bas.
After 24 hours the chatbox-file is still 20 lines ;D
Will include this in the next commit / version