mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-02 20:46:15 +01:00
cleanup
This commit is contained in:
parent
c2f5949623
commit
61dc8e837e
1 changed files with 7 additions and 9 deletions
|
@ -760,14 +760,7 @@ public class BTService extends XWService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( null != m_serverSocket ) {
|
closeServerSocket();
|
||||||
try {
|
|
||||||
m_serverSocket.close();
|
|
||||||
} catch ( IOException ioe ) {
|
|
||||||
logIOE( ioe );
|
|
||||||
}
|
|
||||||
m_serverSocket = null;
|
|
||||||
}
|
|
||||||
} // run()
|
} // run()
|
||||||
|
|
||||||
private static class InPacket {
|
private static class InPacket {
|
||||||
|
@ -840,6 +833,12 @@ public class BTService extends XWService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void stopListening()
|
public void stopListening()
|
||||||
|
{
|
||||||
|
closeServerSocket();
|
||||||
|
interrupt();
|
||||||
|
}
|
||||||
|
|
||||||
|
private synchronized void closeServerSocket()
|
||||||
{
|
{
|
||||||
if ( null != m_serverSocket ) {
|
if ( null != m_serverSocket ) {
|
||||||
try {
|
try {
|
||||||
|
@ -849,7 +848,6 @@ public class BTService extends XWService {
|
||||||
}
|
}
|
||||||
m_serverSocket = null;
|
m_serverSocket = null;
|
||||||
}
|
}
|
||||||
interrupt();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean protoOK( byte proto, BTCmd cmd )
|
private boolean protoOK( byte proto, BTCmd cmd )
|
||||||
|
|
Loading…
Add table
Reference in a new issue