-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
convert SocketChannelEndpoint
to SocketChannel
#42419
convert SocketChannelEndpoint
to SocketChannel
#42419
Conversation
|
(defn log-unexpected-transport! | ||
"Log an error when an unexpected transport is encountered." | ||
[transport] | ||
(let [transport-type (type transport)] | ||
(when-not (contains? @*reported-types transport-type) | ||
(log/errorf "Unexpected transport type encountered in `canceled?`: %s" transport-type)) | ||
(swap! *reported-types conj transport-type))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just want to log this error once per unexpected type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, looks good!
@escherize Did you forget to add a milestone to the issue for this PR? When and where should I add a milestone? |
* convert `SocketChannelEndpoint` to `SocketChannel` * Remove fatal logging (used for debugging) * check for nil channel + log on unknown type * only log unexpected transport types once
* convert `SocketChannelEndpoint` to `SocketChannel` * Remove fatal logging (used for debugging) * check for nil channel + log on unknown type * only log unexpected transport types once Co-authored-by: bryan <bryan.maass@gmail.com>
Fixes #13771
During SSL, the getTransport method was returning a type that we didn't expect:
SocketChannelEndpoint
, and that type was unable to be cast into aSocketChannel
. Calling.getChannel
on theSocketChannelEndpoint
returns aSocketChannel
, so that is what we do.