[QFJ-475] ThreadPerSessionEventHandlingStrategy thread not exiting Created: 30/Sep/09 Updated: 15/Nov/12 Resolved: 05/Apr/10 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | Engine |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Default |
Reporter: | jani | Assignee: | Unassigned |
Resolution: | Duplicate | Votes: | 0 |
Labels: | None | ||
Environment: |
linux |
Issue Links: |
|
Description |
such thread do not exit on acceptor.stop() stopDispatcherThreads iterates the collection after it clear()s it apparently so stopDispatcher() is not run on individual threads. The the run method of ThreadPerSessionEventHandlingStrategy checks for the stopped variable and exits if set to true. In stopDispatcherThreads() we can interupt the thread if the queue is empty. Alternately instead of messages.take() we can use messages.poll() |
Comments |
Comment by jani [ 30/Sep/09 ] |
I don't see how I can attach diffs so here it is what made it work for me Index: core/src/main/java/quickfix/mina/ThreadPerSessionEventHandlingStrategy.java public void stopDispatcherThreads() {
class MessageDispatchingThread extends Thread { @@ -105,9 +105,11 @@ } }
|