run accept() with timeout so it'll show up in logs when the thread

died.  I hope.
This commit is contained in:
Eric House 2012-02-03 17:30:47 -08:00
parent cc9f2b793e
commit bc8299fe30

View file

@ -91,7 +91,7 @@ public class BTService extends Service {
INVITE_DUPID, INVITE_DUPID,
MESG_SEND, MESG_SEND,
MESG_ACCPT, MESG_ACCPT,
MESG__DECL, MESG_DECL,
}; };
private class BTQueueElem { private class BTQueueElem {
@ -286,8 +286,8 @@ public class BTService extends Service {
DataInputStream inStream = null; DataInputStream inStream = null;
int nRead = 0; int nRead = 0;
try { try {
DbgUtils.logf( "run: calling accept()" ); DbgUtils.logf( "run: calling accept(60000)" );
socket = serverSocket.accept(); // blocks socket = serverSocket.accept( 60000 ); // blocks
addAddr( socket ); addAddr( socket );
DbgUtils.logf( "run: accept() returned" ); DbgUtils.logf( "run: accept() returned" );
inStream = new DataInputStream( socket.getInputStream() ); inStream = new DataInputStream( socket.getInputStream() );