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 DiscardCommand
|
||||
public static async Task ExecuteAsync(bool pipeToStdout, 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);
|
||||
|
||||
|
||||
// Send ABORT (cmd == 3)
|
||||
await socket.SendAsync(new byte[] { 3 }, SocketFlags.None);
|
||||
|
||||
|
||||
if (verbose)
|
||||
{
|
||||
Console.WriteLine("Sent ABORT command to daemon.");
|
||||
|
||||
Reference in New Issue
Block a user