5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-17 01:19:29 +08:00

Fix logging bug in call message processor

This commit is contained in:
Fabio Massaioli 2025-02-25 03:33:56 +01:00
parent 0dfc2b2a53
commit 87ceed05fa

View File

@ -151,7 +151,9 @@ func (m *MessageProcessor) processCallMethod(method int, rw http.ResponseWriter,
// Prepare args for logging. This should never fail since json.Unmarshal succeeded before.
jsonArgs, _ := json.Marshal(options.Args)
var jsonResult []byte
defer m.Info("Binding call complete:", "id", *callID, "method", boundMethod, "args", string(jsonArgs), "result", string(jsonResult))
defer func() {
m.Info("Binding call complete:", "id", *callID, "method", boundMethod, "args", string(jsonArgs), "result", string(jsonResult))
}()
// Set the context values for the window
if window != nil {