mirror of
https://github.com/amnezia-vpn/amneziawg-go.git
synced 2025-06-06 21:33:44 +02:00
device: accept any io.Reader in device.IpcSetOperation
Any io.Reader will do, and there are no performance concerns here. This is technically backwards incompatible, but it is very unlikely to break any existing code. It is compatible with the existing uses in wireguard-{windows,android,apple} and also will allow us to slightly simplify it if desired. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
parent
db1edc7e91
commit
93a4313c3a
1 changed files with 2 additions and 2 deletions
|
@ -107,8 +107,8 @@ func (device *Device) IpcGetOperation(socket *bufio.Writer) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (device *Device) IpcSetOperation(socket *bufio.Reader) error {
|
func (device *Device) IpcSetOperation(r io.Reader) error {
|
||||||
scanner := bufio.NewScanner(socket)
|
scanner := bufio.NewScanner(r)
|
||||||
logError := device.log.Error
|
logError := device.log.Error
|
||||||
logDebug := device.log.Debug
|
logDebug := device.log.Debug
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue