File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,9 @@ impl DialogState {
226226 pub fn is_terminated ( & self ) -> bool {
227227 matches ! ( self , DialogState :: Terminated ( _, _) )
228228 }
229+ pub fn waiting_ack ( & self ) -> bool {
230+ matches ! ( self , DialogState :: WaitAck ( _, _) )
231+ }
229232}
230233
231234impl DialogInner {
@@ -297,6 +300,9 @@ impl DialogInner {
297300 pub fn is_terminated ( & self ) -> bool {
298301 self . state . lock ( ) . unwrap ( ) . is_terminated ( )
299302 }
303+ pub fn waiting_ack ( & self ) -> bool {
304+ self . state . lock ( ) . unwrap ( ) . waiting_ack ( )
305+ }
300306 pub fn get_local_seq ( & self ) -> u32 {
301307 self . local_seq . load ( Ordering :: Relaxed )
302308 }
Original file line number Diff line number Diff line change @@ -350,7 +350,7 @@ impl ServerInviteDialog {
350350 /// # }
351351 /// ```
352352 pub async fn bye ( & self ) -> Result < ( ) > {
353- if !self . inner . is_confirmed ( ) {
353+ if !self . inner . is_confirmed ( ) && ! self . inner . waiting_ack ( ) {
354354 return Ok ( ( ) ) ;
355355 }
356356 info ! ( id=%self . id( ) , "sending bye request" ) ;
You can’t perform that action at this time.
0 commit comments