Clients fixed.

authc
Karchnu 2020-07-23 19:39:58 +02:00
parent 54a2ba563f
commit 83d9513206
5 changed files with 2 additions and 10 deletions

View File

@ -410,7 +410,7 @@ module AuthD
end
def send(type : Request::Type, payload)
send @server_fd, type.value.to_u8, payload
send_now @server_fd, type.value.to_u8, payload
end
def decode_token(token)
@ -583,7 +583,7 @@ end
class IPC::Client
def send(request : AuthD::Request)
unless (fd = @server_fd).nil?
send fd, request.type.to_u8, request.to_json
send_now fd, request.type.to_u8, request.to_json
else
raise "Client not connected to the server"
end

View File

@ -28,8 +28,6 @@ OptionParser.parse do |parser|
end
begin
authd = IPC::Connection.new "auth"
authd = AuthD::Client.new
authd.key = File.read(key_file.not_nil!).chomp

View File

@ -28,8 +28,6 @@ OptionParser.parse do |parser|
end
begin
authd = IPC::Connection.new "auth"
authd = AuthD::Client.new
authd.key = File.read(key_file.not_nil!).chomp

View File

@ -28,8 +28,6 @@ OptionParser.parse do |parser|
end
begin
authd = IPC::Connection.new "auth"
authd = AuthD::Client.new
# authd.key = File.read(key_file.not_nil!).chomp

View File

@ -28,8 +28,6 @@ OptionParser.parse do |parser|
end
begin
authd = IPC::Connection.new "auth"
authd = AuthD::Client.new
authd.key = File.read(key_file.not_nil!).chomp