Skip to content

Only support read_time and write_timeout, connect_timeout not raise connect error #4

@YaEvan

Description

@YaEvan

connect_timeout raise SocketTimeout, "#{type} timeout" only read timeout/ write timeout
def select_timeout(type, timeout) if timeout >= 0 if type == :read read_array = [@socket] else write_array = [@socket] end start = Time.now if IO.select(read_array, write_array, [@socket], timeout) waited = Time.now - start return timeout - waited end end raise SocketTimeout, "#{type} timeout" end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions