Right fd closing order.
This commit is contained in:
parent
4d7a7d3742
commit
6d4db9a8ac
@ -105,24 +105,25 @@ class Relations < Array(Relation)
|
|||||||
LibIPC.ipc_del_fd pointer_ctx, r.fd_service
|
LibIPC.ipc_del_fd pointer_ctx, r.fd_service
|
||||||
|
|
||||||
# Close these sockets.
|
# Close these sockets.
|
||||||
|
Baguette::Log.debug "Closing both #{r.fd_client} and #{r.fd_service} (ws)"
|
||||||
begin
|
begin
|
||||||
s = Socket.new r.fd_client, Socket::Family::UNIX, Socket::Type::RAW
|
s = Socket.new r.fd_client, Socket::Family::UNIX, Socket::Type::RAW
|
||||||
s.close
|
s.close
|
||||||
rescue e
|
rescue e
|
||||||
Baguette::Log.error "(ignoring) closing the client socket: #{e}"
|
Baguette::Log.error "(ignoring) closing the client socket: #{e}"
|
||||||
end
|
end
|
||||||
begin
|
|
||||||
s = Socket.new r.fd_service, Socket::Family::INET, Socket::Type::STREAM
|
|
||||||
s.close
|
|
||||||
rescue e
|
|
||||||
Baguette::Log.error "(ignoring) closing the service socket: #{e}"
|
|
||||||
end
|
|
||||||
begin
|
begin
|
||||||
r.ws.close
|
r.ws.close
|
||||||
Baguette::Log.warning "CLOSING THE WS"
|
|
||||||
rescue e
|
rescue e
|
||||||
Baguette::Log.error "(ignoring) closing the ws: #{e}"
|
Baguette::Log.error "(ignoring) closing the ws: #{e}"
|
||||||
end
|
end
|
||||||
|
# Trying not to close this socket (ws already do that).
|
||||||
|
#begin
|
||||||
|
# s = Socket.new r.fd_service, Socket::Family::INET, Socket::Type::STREAM
|
||||||
|
# s.close
|
||||||
|
#rescue e
|
||||||
|
# Baguette::Log.error "(ignoring) closing the service socket: #{e}"
|
||||||
|
#end
|
||||||
|
|
||||||
all_fd.select! {|v| v != r.fd_client && v != r.fd_service }
|
all_fd.select! {|v| v != r.fd_client && v != r.fd_service }
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user