Skip to content

Commit

Permalink
💥🔥 Remove deprecated #client_thread attr_reader
Browse files Browse the repository at this point in the history
I don't know what the original purpose for `#client_thread` was, and it
was deprecated by v0.4.0.  There's nothing particularly special about
the Thread that created the client instance.  Net::IMAP doesn't use it,
clients can use multiple threads, and users of Net::IMAP can track this
for themselves if they need to.
  • Loading branch information
nevans committed Sep 14, 2024
1 parent 14f848f commit 3b3f8ae
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lib/net/imap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -944,21 +944,13 @@ def initialize(host, port: nil, ssl: nil,
@sock = tcp_socket(@host, @port)
start_tls_session if ssl_ctx
start_imap_connection

# DEPRECATED: to remove in next version
@client_thread = Thread.current
end

# Returns true after the TLS negotiation has completed and the remote
# hostname has been verified. Returns false when TLS has been established
# but peer verification was disabled.
def tls_verified?; @tls_verified end

def client_thread # :nodoc:
warn "Net::IMAP#client_thread is deprecated and will be removed soon."
@client_thread
end

# Disconnects from the server.
#
# Related: #logout, #logout!
Expand Down

0 comments on commit 3b3f8ae

Please sign in to comment.