[QFJ-643] Unable to restart a stopped acceptor (SocketAcceptor) Created: 18/Oct/11 Updated: 02/Dec/11 Resolved: 02/Dec/11 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | Engine |
Affects Version/s: | 1.5.0, 1.5.1 |
Fix Version/s: | 1.5.2 |
Type: | Bug | Priority: | Major |
Reporter: | Christoph John | Assignee: | Christoph John |
Resolution: | Fixed | Votes: | 0 |
Labels: | None |
Description |
This is a similar issue as in When I do acceptor.start() QF/J says: Listening for connections at 0.0.0.0/0.0.0.0:10040 netstat output: tcp6 0 0 :::10040 :::* LISTEN After a stop() and another start(), the acceptor does not print the usual "Listening... at" information and also the netstat output is not listing the port. A workaround could be to re-create the acceptor. But this is somewhat unexpected since we have start() and stop() methods. If I interpret the code in the SocketAcceptor.class correctly, all that is needed is to set the "isStarted" flag to FALSE again on a stop(). This would trigger the call of the method "startAcceptingConnections()" on the next start() call. Could someone with more insight into the code please comment on this? Thanks in advance, |
Comments |
Comment by Christoph John [ 18/Oct/11 ] |
I expect the issue to exist for longer than 1.5.0 and 1.5.1. But these are the versions I have tested with. |
Comment by Laurent Danesi [ 19/Oct/11 ] |
Hi Christoph, You are right for the boolean "isStarted" but this is not enough since in the stop(boolean forceDisconnect) method, we call Session.unregisterSessions(getSessions()) that will remove all sessions. So, the actual stop() method is more a "destroy" method if can say that. A good solution, could be to move the sessions creation in the start or split the stop() method. Regards, |
Comment by Christoph John [ 08/Nov/11 ] |
Hi Laurent, could you please elaborate further on where to move the sessions creation? I have not had very much insight into the QF/J code until now. Thanks, |