Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/resty/logger/socket.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ local function _do_connect()
ok, err = sock:connect(host, port)
end
elseif path then
ok, err = sock:connect("unix:" .. path)
if (sock_type == 'udp') then
ok, err = sock:setpeername("unix:" .. path)
else
ok, err = sock:connect("unix:" .. path)
end
end

if not ok then
Expand Down