diff --git a/modbussrv.cc b/modbussrv.cc index 20d62a5..b2e5542 100644 --- a/modbussrv.cc +++ b/modbussrv.cc @@ -259,10 +259,11 @@ void ModbusSrv::ServerThread() { } else { char *txt = (char*)malloc(255); - snprintf (txt, 255, "error on processing message\n"); + snprintf (txt, 255, "error on processing message, close connection\n"); gdk_threads_add_idle(cb_thread_network_text_add, txt); delete clients[slot]; clients[slot] = NULL; + } } else if (mbindata->fc == 5 || mbindata->fc == 6) { @@ -273,7 +274,7 @@ void ModbusSrv::ServerThread() { } else { char *txt = (char*)malloc(255); - snprintf (txt, 255, "error on processing message\n"); + snprintf (txt, 255, "error on processing message, close connection\n"); gdk_threads_add_idle(cb_thread_network_text_add, txt); delete clients[slot]; clients[slot] = NULL; @@ -285,7 +286,7 @@ void ModbusSrv::ServerThread() { } else { char *txt = (char*)malloc(255); - snprintf (txt, 255, "error on processing message\n"); + snprintf (txt, 255, "error on processing message, close connection\n"); gdk_threads_add_idle(cb_thread_network_text_add, txt); delete clients[slot]; clients[slot] = NULL;