Android Question Untrappable error?

Levisvv

Member
Licensed User
Longtime User
I have a tcp client app that I am running as a service so it stays running all the time, but for some reason I am getting an error whenever I run the app, error: "An error has occurred in sub: java.lang.Exception: Sub socket1_connected was not found. Continue?"

But when I run the exact same app in debug/rapid mode, I get absolutely no error at all.
How can I possible find where this error is occurring?
 

Levisvv

Member
Licensed User
Longtime User
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:
B4X:
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?
 
Upvote 0
Top