5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-25 00:11:35 +00:00

Fix bug in admin socket where requests fail unless "arguments":{} is specified in the JSON

This commit is contained in:
Neil Alexander 2022-10-26 22:29:19 +01:00
parent 98b0aaf747
commit cfa293d189

View File

@ -327,6 +327,7 @@ func (a *AdminSocket) handleRequest(conn net.Conn) {
var buf json.RawMessage var buf json.RawMessage
var req AdminSocketRequest var req AdminSocketRequest
var resp AdminSocketResponse var resp AdminSocketResponse
req.Arguments = []byte("{}")
if err := func() error { if err := func() error {
if err = decoder.Decode(&buf); err != nil { if err = decoder.Decode(&buf); err != nil {
return fmt.Errorf("Failed to find request") return fmt.Errorf("Failed to find request")