mirror of https://github.com/apache/activemq.git
[AMQ-7444] Fallback to remote location for remote address when socket has not been created yet
(cherry picked from commit 0c1b3e9240
)
This commit is contained in:
parent
71be503447
commit
c27e27c2c3
|
@ -49,13 +49,20 @@ public class StompNIOSSLTransport extends NIOSSLTransport {
|
|||
super(wireFormat, socket, null, null, null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public StompNIOSSLTransport(WireFormat wireFormat, Socket socket,
|
||||
SSLEngine engine, InitBuffer initBuffer, ByteBuffer inputBuffer) throws IOException {
|
||||
super(wireFormat, socket, engine, initBuffer, inputBuffer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRemoteAddress() {
|
||||
String remoteAddress = super.getRemoteAddress();
|
||||
if (remoteAddress == null) {
|
||||
return remoteLocation.toString();
|
||||
}
|
||||
return remoteAddress;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initializeStreams() throws IOException {
|
||||
codec = new StompCodec(this);
|
||||
|
|
Loading…
Reference in New Issue