File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 3131
3232* Bump upstream deps to ce2ba11a
3333
34+ ## Added
35+
36+ * Expose ` Relay::ban `
37+
3438## 0.40.2
3539
3640### Fixed
Original file line number Diff line number Diff line change @@ -185,11 +185,18 @@ impl JsRelay {
185185 self . inner . try_connect ( * * timeout) . await . map_err ( into_err)
186186 }
187187
188- /// Disconnect from relay and set status to ' Terminated'
188+ /// Disconnect from relay and set status to ` Terminated`
189189 pub fn disconnect ( & self ) {
190190 self . inner . disconnect ( )
191191 }
192192
193+ /// Ban relay and set status to `Banned`.
194+ ///
195+ /// A banned relay can't reconnect again.
196+ pub fn ban ( & self ) {
197+ self . inner . ban ( )
198+ }
199+
193200 /// Send msg to relay
194201 #[ wasm_bindgen( js_name = sendMsg) ]
195202 pub fn send_msg ( & self , msg : & JsClientMessage ) -> Result < ( ) > {
You can’t perform that action at this time.
0 commit comments