mirror of https://github.com/apache/activemq.git
[AMQ-7444] Fallback to remote location for remote address when socket has not been created yet
This commit is contained in:
parent
07486de0fd
commit
0c1b3e9240
|
@ -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