There are no way (I have searched a lot!) to handle the return code from tcpReply(session) and be able to restart the module if needed (sent fail or wrong fail). So this is what I did to solve that.