mirror of
https://github.com/netbirdio/IronRDP.git
synced 2026-05-22 18:43:12 -07:00
fix(server): do not restart static channels on reactivation
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
committed by
Benoît Cortier
parent
c4587b537c
commit
82c7c2f5b0
@@ -43,6 +43,7 @@ pub struct AcceptorResult {
|
||||
pub input_events: Vec<Vec<u8>>,
|
||||
pub user_channel_id: u16,
|
||||
pub io_channel_id: u16,
|
||||
pub reactivation: bool,
|
||||
}
|
||||
|
||||
impl Acceptor {
|
||||
@@ -150,6 +151,7 @@ impl Acceptor {
|
||||
input_events,
|
||||
user_channel_id: self.user_channel_id,
|
||||
io_channel_id: self.io_channel_id,
|
||||
reactivation: self.reactivation,
|
||||
}),
|
||||
previous_state => {
|
||||
self.state = previous_state;
|
||||
|
||||
@@ -670,14 +670,16 @@ impl RdpServer {
|
||||
}
|
||||
|
||||
self.static_channels = result.static_channels;
|
||||
for (_type_id, channel, channel_id) in self.static_channels.iter_mut() {
|
||||
debug!(?channel, ?channel_id, "Start");
|
||||
let Some(channel_id) = channel_id else {
|
||||
continue;
|
||||
};
|
||||
let svc_responses = channel.start()?;
|
||||
let response = server_encode_svc_messages(svc_responses, channel_id, result.user_channel_id)?;
|
||||
writer.write_all(&response).await?;
|
||||
if !result.reactivation {
|
||||
for (_type_id, channel, channel_id) in self.static_channels.iter_mut() {
|
||||
debug!(?channel, ?channel_id, "Start");
|
||||
let Some(channel_id) = channel_id else {
|
||||
continue;
|
||||
};
|
||||
let svc_responses = channel.start()?;
|
||||
let response = server_encode_svc_messages(svc_responses, channel_id, result.user_channel_id)?;
|
||||
writer.write_all(&response).await?;
|
||||
}
|
||||
}
|
||||
|
||||
let mut rfxcodec = None;
|
||||
|
||||
Reference in New Issue
Block a user