xmpp_codec: encode </stream:stream>

Astro created

Change summary

src/xmpp_codec.rs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

Detailed changes

src/xmpp_codec.rs 🔗

@@ -317,8 +317,10 @@ impl Encoder for XMPPCodec {
                     })
                     .map_err(to_io_err)
             }
-            // TODO: Implement all
-            _ => Ok(()),
+            Packet::StreamEnd => {
+                write!(dst, "</stream:stream>\n")
+                    .map_err(to_io_err)
+            }
         }
     }
 }