[QFJ-266] Initiator can't reconnect if there was no network during startup. Created: 22/Nov/07 Updated: 15/Jan/08 Resolved: 22/Dec/07 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | None |
Affects Version/s: | 1.2.1, 1.3.0 |
Fix Version/s: | 1.3.1 |
Type: | Bug | Priority: | Default |
Reporter: | Bartosz Lawniczek | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Environment: |
Windows XP |
Description |
IoSessionInitiator.connect() method throws UnresolvedAddressException if there is no network connection. After connection is reestablished it is not able to recover and still throws UnresolvedAddressException. This is because InetSocketAddress is created only ones during startup. If it was not resolved then it will never be resolved. Workaround is to create new InetSocketAddress each time the Initiator tries to reconnect and the address is unresolved. Modification of IoSessionInitiator.getNextSocketAddress() that fixed the problem for me: private SocketAddress getNextSocketAddress() { if (socketAddress instanceof InetSocketAddress) { } nextSocketAddressIndex = (nextSocketAddressIndex + 1) % socketAddresses.length; |
Comments |
Comment by Steve Bate [ 22/Dec/07 ] |
Added the patch. Thanks. |