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:
Andrew Purtell 2016-01-15 17:32:43 -08:00
parent 795f91439c
commit 1f1a8fd7d3
1 changed files with 1 additions and 1 deletions

View File

@ -2591,7 +2591,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;