Amend HBASE-14771 RpcServer#getRemoteAddress always returns null
This change has been reported to cause Phoenix's PhoenixIndexRpcSchedulerTest to fail with a NPE
This commit is contained in:
parent
795f91439c
commit
1f1a8fd7d3
|
@ -2591,7 +2591,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
|
||||||
*/
|
*/
|
||||||
public static InetAddress getRemoteIp() {
|
public static InetAddress getRemoteIp() {
|
||||||
Call call = CurCall.get();
|
Call call = CurCall.get();
|
||||||
if (call != null && call.connection.socket != null) {
|
if (call != null && call.connection != null && call.connection.socket != null) {
|
||||||
return call.connection.socket.getInetAddress();
|
return call.connection.socket.getInetAddress();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue