I have a simple client-server app on android. the android service communicates with the server via tcp sockets. the service sends a simple String to server which works. the server processes the string and sends back an object to the android service. the object implements the serializable interface. the object "leaves" the server successfully but at the point where the android service receives the object (socket.readObject()) I get to following exception:
java.net.SocketException: Bad socket
I've never seen this. What does that mean?
Edit:
Method where exception gets thrown:
private static void startContextListener(){
new Thread(){
public void run(){
try{
while(contextsocket != null && !contextsocket.isClosed() && inContext.readObject() != null){
kontext = (Kontext) inContext.readObject();
}
}
catch(Exception e){
Log.e(TAG, "startContextListener(): " + e.toString());
}
}
}.start();
}