Clients fixed.
This commit is contained in:
parent
54a2ba563f
commit
83d9513206
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user