Reverted hard requirement for gateway protocol presence (#1875)
This commit is contained in:
committed by
GitHub
parent
825791f2c7
commit
1b7c048c96
@@ -408,18 +408,24 @@ impl GatewayClient {
|
||||
) -> Result<(), GatewayClientError> {
|
||||
// right now there are no failure cases here, but this might change in the future
|
||||
match gateway_protocol {
|
||||
Some(v) if v == PROTOCOL_VERSION => {
|
||||
info!("the gateway is using exactly the same protocol version as we are. We're good to continue!");
|
||||
None => {
|
||||
warn!("the gateway we're connected to has not specified its protocol version. It's probably running version < 1.1.X, but that's still fine for now. It will become a hard error in 1.2.0");
|
||||
// note: in +1.2.0 we will have to return a hard error here
|
||||
Ok(())
|
||||
}
|
||||
v => {
|
||||
Some(v) if v != PROTOCOL_VERSION => {
|
||||
let err = GatewayClientError::IncompatibleProtocol {
|
||||
gateway: v,
|
||||
gateway: Some(v),
|
||||
current: PROTOCOL_VERSION,
|
||||
};
|
||||
error!("{err}");
|
||||
Err(err)
|
||||
}
|
||||
|
||||
Some(_) => {
|
||||
info!("the gateway is using exactly the same protocol version as we are. We're good to continue!");
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -348,18 +348,24 @@ where
|
||||
) -> Result<(), InitialAuthenticationError> {
|
||||
// right now there are no failure cases here, but this might change in the future
|
||||
match client_protocol {
|
||||
Some(v) if v == PROTOCOL_VERSION => {
|
||||
info!("the client is using exactly the same protocol version as we are. We're good to continue!");
|
||||
None => {
|
||||
warn!("the client we're connected to has not specified its protocol version. It's probably running version < 1.1.X, but that's still fine for now. It will become a hard error in 1.2.0");
|
||||
// note: in +1.2.0 we will have to return a hard error here
|
||||
Ok(())
|
||||
}
|
||||
v => {
|
||||
Some(v) if v != PROTOCOL_VERSION => {
|
||||
let err = InitialAuthenticationError::IncompatibleProtocol {
|
||||
client: v,
|
||||
client: Some(v),
|
||||
current: PROTOCOL_VERSION,
|
||||
};
|
||||
error!("{err}");
|
||||
Err(err)
|
||||
}
|
||||
|
||||
Some(_) => {
|
||||
info!("the client is using exactly the same protocol version as we are. We're good to continue!");
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user