Mercurial > stress-tester
changeset 1145:20c663622c30
NioEmitterWorkerImpl, SocketConnection - bind bugfix
author | Devel 2 |
---|---|
date | Wed, 10 Jun 2020 15:07:57 +0200 |
parents | dbb7bc5daf60 |
children | c25812252c9d |
files | stress-tester/src/main/java/com/passus/st/emitter/nio/NioEmitterWorkerImpl.java stress-tester/src/main/java/com/passus/st/emitter/socket/SocketConnection.java |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/emitter/nio/NioEmitterWorkerImpl.java Wed Jun 10 12:15:19 2020 +0200 +++ b/stress-tester/src/main/java/com/passus/st/emitter/nio/NioEmitterWorkerImpl.java Wed Jun 10 15:07:57 2020 +0200 @@ -46,7 +46,7 @@ channel.socket().setSoTimeout((int) timeouts.getReadTimeout()); SocketAddress bindAddress = connParams.getBindAddress(); - if (bindAddress != null && ANY_SOCKET.equals(bindAddress)) { + if (bindAddress != null && !ANY_SOCKET.equals(bindAddress)) { channel.bind(AddressUtils.socketAddressToJdkSocket(bindAddress)); }
--- a/stress-tester/src/main/java/com/passus/st/emitter/socket/SocketConnection.java Wed Jun 10 12:15:19 2020 +0200 +++ b/stress-tester/src/main/java/com/passus/st/emitter/socket/SocketConnection.java Wed Jun 10 15:07:57 2020 +0200 @@ -80,7 +80,7 @@ socket = new Socket(); } - if (bindAddress != null && ANY_SOCKET.equals(bindAddress)) { + if (bindAddress != null && !ANY_SOCKET.equals(bindAddress)) { socket.bind(socketAddressToJdkSocket(bindAddress)); }