More clear condition

This commit is contained in:
Ivan Markin 2016-11-10 18:21:42 +00:00
parent 38b4676028
commit d847716c21
1 changed files with 3 additions and 3 deletions

View File

@ -78,9 +78,9 @@ func (c *Conn) AddOnion(ports []OnionPortSpec, key crypto.PrivateKey, oneshot bo
var resp *Response
if hsKeyStr == "" {
flags := " Flags=DiscardPK"
if !oneshot {
flags = ""
flags := ""
if oneshot {
flags = " Flags=DiscardPK"
}
resp, err = c.Request("ADD_ONION NEW:BEST%s%s", portStr, flags)
} else {