hyperionjv / bluecove

Automatically exported from code.google.com/p/bluecove
0 stars 0 forks source link

StreamConnectionNotifier.acceptAndOpen does not release block after close() method is invoked on the notifier #80

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
According to JSR 82:
<quote>
once an application invokes close() on any L2CAPConnectionNotifier,
SessionNotifier, or StreamConnectionNotifer instance, all pending
acceptAndOpen() methods that have been invoked previously on that instance
MUST throw InterruptedIOException. This mechanism provides an application
with the means to cancel any outstanding acceptAndOpen() method calls. 
</quote>

However, sometimes acceptAndOpen continues blocking thread instead of
throwing InterruptedIOException after close() method invokation  

What steps will reproduce the problem?
1. Open SPP server connection.
2. Start thread with accepting incoming connections (AcceptorThread)
3. Connect to this SPP server and transfer some data both ways.
4. Invoke close() method on the StreamConnectionNotifier.

What is the expected output? 
IterruptedIOException must be thrown
What do you see instead?
Sometimes, AcceptorThread is blocked by acceptAndOpen forever.

What BlueCove version are you using (include build number for SNAPSHOT)? 
2.1.0
On what operating system and jvm? Is this 64-bit or 32-bit OS and jvm?
Win XP SP2 32-bit, JRE 1.6.0_11

Original issue reported on code.google.com by aburdu...@gmail.com on 28 Jul 2009 at 6:27

GoogleCodeExporter commented 9 years ago
The problem is reproduced from time to time, but often enough on Microsoft 
Winsock
and Bluesoleil stacks (probably, it also exists on WINDCOMM stack).  

Original comment by aburdu...@gmail.com on 28 Jul 2009 at 6:29

GoogleCodeExporter commented 9 years ago
Same issue, the instruction blocks everything.

Original comment by esaias.p...@gmail.com on 29 Sep 2009 at 1:16