Returning -1 from a function with bool as return argument is the same as returning true. If the channel is not connected, return false instead to indicate the error.
Returning -1 from a function with bool as return argument is the same as returning true. If the channel is not connected, return false instead to indicate the error.