Skip to content

Commit

Permalink
fix timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
HereAdvertise authored Jul 11, 2024
1 parent de6dc04 commit c12b944
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pgmoon/redbean.moon
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,10 @@ class RedbeanSocket
assert unix.close @unix_socket

settimeout: (t) =>
@timeout = t
if @unix_socket
unix.setsockopt @unix_socket, SOL_SOCKET, SO_RCVTIMEO, t / 1000
unix.setsockopt @unix_socket, SOL_SOCKET, SO_SNDTIMEO, t / 1000
else
@timeout = t

-- openresty pooling interface, always return 0 to suggest that the socket
-- is connecting for the first time
Expand Down

0 comments on commit c12b944

Please sign in to comment.