diff --git a/sources/Google.Solutions.IapTunneling/Iap/Messages.cs b/sources/Google.Solutions.IapTunneling/Iap/Messages.cs index 2919268ea..27c02baec 100644 --- a/sources/Google.Solutions.IapTunneling/Iap/Messages.cs +++ b/sources/Google.Solutions.IapTunneling/Iap/Messages.cs @@ -97,7 +97,9 @@ public enum CloseCode : int DESTINATION_READ_FAILED = 4010, INVALID_DATA = 4013, - NOT_AUTHORIZED = 4033 + NOT_AUTHORIZED = 4033, + LOOKUP_FAILED = 4047, + LOOKUP_FAILED_RECONNECT = 4051 } /// diff --git a/sources/Google.Solutions.IapTunneling/Iap/SshRelayStream.cs b/sources/Google.Solutions.IapTunneling/Iap/SshRelayStream.cs index fe2cb792c..69945b42d 100644 --- a/sources/Google.Solutions.IapTunneling/Iap/SshRelayStream.cs +++ b/sources/Google.Solutions.IapTunneling/Iap/SshRelayStream.cs @@ -252,7 +252,9 @@ public async Task TestConnectionAsync(TimeSpan timeout) } } catch (WebSocketStreamClosedByServerException e) - when ((CloseCode)e.CloseStatus == CloseCode.NOT_AUTHORIZED) + when ((CloseCode)e.CloseStatus == CloseCode.NOT_AUTHORIZED || + (CloseCode)e.CloseStatus == CloseCode.LOOKUP_FAILED || + (CloseCode)e.CloseStatus == CloseCode.LOOKUP_FAILED_RECONNECT) { // // Request was rejected by access level or IAM policy.