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
2d2fdd5a9f
commit
79588240c6
|
@ -2603,7 +2603,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
|
|||
*/
|
||||
public static InetAddress getRemoteIp() {
|
||||
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 null;
|
||||
|
|
Loading…
Reference in New Issue