Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

Commit

Permalink
Updated SendCommand.
Browse files Browse the repository at this point in the history
  • Loading branch information
alvr committed Oct 27, 2016
1 parent fdf2f02 commit 7ffb42d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ASFui/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,19 @@ namespace ASFui
{
internal static class Util
{
private static readonly BasicHttpBinding Binding = new BasicHttpBinding {SendTimeout = new TimeSpan(0, 30, 0)};

public static bool CheckBinary()
{
return File.Exists(Settings.Default.ASFBinary) || !Settings.Default.IsLocal;
}

public static string SendCommand(string command)
{
var binding = new BasicHttpBinding {SendTimeout = new TimeSpan(0, 30, 0)};
var asfClient = new Client(binding, new EndpointAddress(GetEndpointAddress()));

return asfClient.HandleCommand(command);
using (var asfClient = new Client(Binding, new EndpointAddress(GetEndpointAddress())))
{
return asfClient.HandleCommand(command);
}
}

public static string GenerateCommand(string command, string user, string args = "")
Expand Down

0 comments on commit 7ffb42d

Please sign in to comment.