Prevent empty disconnect reasons
parent
4845a3fda9
commit
ccec89bce6
|
@ -5,6 +5,10 @@ import "github.com/anon55555/mt"
|
|||
// Kick sends mt.ToCltDisco with the specified custom reason
|
||||
// and closes the ClientConn.
|
||||
func (cc *ClientConn) Kick(reason string) {
|
||||
if reason == "" {
|
||||
reason = "Kicked by proxy."
|
||||
}
|
||||
|
||||
ack, _ := cc.SendCmd(&mt.ToCltDisco{
|
||||
Reason: mt.Custom,
|
||||
Custom: reason,
|
||||
|
|
Loading…
Reference in New Issue