The code is a bit big, but I think I found my problem: I was checking if the socket was initialized, but checking from a different module, still odd that it would run fine within debug mode though..
I moved my routine for checking the socket to the server module, and used:
CallSub(KioskService,"RetrySocket")
to try to reconnect and it fixed my issue.
On the same topic though; I have it talking nicely with my server application, but if I disconnect my server, I get no indication that the socket is closed. How can I get that?