improvement websocket according to gorilla example
This commit is contained in:
@@ -60,14 +60,12 @@ func (c *ClientHandler) SendResponse(id string, r *json_dataModels.Response) err
|
||||
return fmt.Errorf("client not found for id %s", id)
|
||||
|
||||
}
|
||||
b, err := json.Marshal(r)
|
||||
|
||||
b, err := json.Marshal(*r)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := client.SendResponse(b, 5); err != nil {
|
||||
return err
|
||||
}
|
||||
client.SendResponse(b)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user