chore: Introduce Qodana static analysis configuration and apply minor code formatting and C# 12 collection expressions.
This commit is contained in:
@@ -11,18 +11,18 @@ public static class StatusCommand
|
||||
public static async Task ExecuteAsync(bool json, bool verbose)
|
||||
{
|
||||
Logger.Verbose = verbose;
|
||||
|
||||
|
||||
var socketPath = DaemonService.GetSocketPath();
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
using var socket = new Socket(AddressFamily.Unix, SocketType.Stream, ProtocolType.Unspecified);
|
||||
var endPoint = new UnixDomainSocketEndPoint(socketPath);
|
||||
await socket.ConnectAsync(endPoint);
|
||||
|
||||
|
||||
var msg = new byte[] { 5, (byte)(json ? 1 : 0) };
|
||||
await socket.SendAsync(msg, SocketFlags.None);
|
||||
|
||||
|
||||
var responseBuffer = new byte[4096];
|
||||
int received = await socket.ReceiveAsync(responseBuffer, SocketFlags.None);
|
||||
if (received > 0)
|
||||
|
||||
Reference in New Issue
Block a user