Skip to content

Commit

Permalink
Explicitly convert an integer to bool
Browse files Browse the repository at this point in the history
for better code readability
  • Loading branch information
abitmore committed Jan 3, 2021
1 parent a93b4b6 commit 95cf925
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/network/tcp_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ namespace fc {

void tcp_socket::enable_keep_alives(const fc::microseconds& interval)
{
if (interval.count())
if (interval.count() > 0)
{
boost::asio::socket_base::keep_alive option(true);
my->_sock.set_option(option);
Expand Down

0 comments on commit 95cf925

Please sign in to comment.