klippy_connection: socket credential fix
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
cd19b51117
commit
2e3188a48b
|
@ -240,8 +240,9 @@ class KlippyConnection:
|
||||||
return
|
return
|
||||||
data: bytes = b""
|
data: bytes = b""
|
||||||
try:
|
try:
|
||||||
data = sock.getsockopt(socket.SOL_SOCKET, socket.SO_PEERCRED, 12)
|
size = struct.calcsize("3I")
|
||||||
pid, uid, gid = struct.unpack("@LLL", data)
|
data = sock.getsockopt(socket.SOL_SOCKET, socket.SO_PEERCRED, size)
|
||||||
|
pid, uid, gid = struct.unpack("3I", data)
|
||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
raise
|
raise
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
Loading…
Reference in New Issue