Pep crack cocaine

This commit is contained in:
Luca Warmenhoven
2024-05-28 15:04:17 +02:00
parent 62e1320b3c
commit 565d19ec00

View File

@@ -73,7 +73,11 @@ public class WebServer implements Runnable {
streamIn.close(); // Closes the reader, stream and socket connection.
this.eventHandler.onReceive(builder.toString());
String[] data = builder.toString().split("\n\n");
if ( data.length > 1) { // Check if the data is valid.
this.eventHandler.onReceive(data[1]);
}
} catch (IOException error) {
String reason = error.getMessage() == null ? "Unknown reason" : error.getMessage();