Title: leak udp port as not catch InternalError when "selector.wakeup();" · Issue #318 · dnsjava/dnsjava · GitHub
Open Graph Title: leak udp port as not catch InternalError when "selector.wakeup();" · Issue #318 · dnsjava/dnsjava
X Title: leak udp port as not catch InternalError when "selector.wakeup();" · Issue #318 · dnsjava/dnsjava
Description: in NioUdpClient.sendrecv method, when IOException happened,channel will be closed,so the os can reuse the udp port. but, when execute "selector.wakeup();" , it may throw a InternalError which is a Throwable Error, not a IOException. thus...
Open Graph Description: in NioUdpClient.sendrecv method, when IOException happened,channel will be closed,so the os can reuse the udp port. but, when execute "selector.wakeup();" , it may throw a InternalError which is a ...
X Description: in NioUdpClient.sendrecv method, when IOException happened,channel will be closed,so the os can reuse the udp port. but, when execute "selector.wakeup();" , it may throw a InternalError w...
Opengraph URL: https://github.com/dnsjava/dnsjava/issues/318
X: @github
Domain: redirect.github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"leak udp port as not catch InternalError when \"selector.wakeup();\" ","articleBody":"in NioUdpClient.sendrecv method, when IOException happened,channel will be closed,so the os can reuse the udp port.\r\nbut, when execute \"selector.wakeup();\" , it may throw a InternalError which is a Throwable Error, not a IOException.\r\nthus the channel will not be closed any more, it will occupy the udp port forever, when times on, there will no port can be used.\r\n\r\nbelow is the code:\r\n\r\nstatic CompletableFuture\u003cbyte[]> sendrecv(\r\n // some other code here\r\n try {\r\n final Selector selector = selector();\r\n channel = DatagramChannel.open();\r\n channel.configureBlocking(false);\r\n \r\n // some other code here\r\n\r\n channel.connect(remote);\r\n pendingTransactions.add(t);\r\n registrationQueue.add(t);\r\n selector.wakeup();\r\n } catch (IOException e) {\r\n if (channel != null) {\r\n try {\r\n channel.close();\r\n } catch (IOException ioe) {\r\n // ignore\r\n }\r\n }\r\n f.completeExceptionally(e);\r\n }\r\n\r\n return f;\r\n }\r\n\r\n","author":{"url":"https://github.com/goodjin","@type":"Person","name":"goodjin"},"datePublished":"2024-03-29T08:08:17Z","url":"https://github.com/dnsjava/dnsjava/issues/318"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:126331bf-18f3-86e2-9302-668a8e0ae979 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D192:1476E9:344193:479696:6B060158 |
| html-safe-nonce | 898623df2d7893a1ef6702fe6cbecf9c469ebc237c40ac2c311df1b4d5ae1b02 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTkyOjE0NzZFOTozNDQxOTM6NDc5Njk2OjZCMDYwMTU4IiwidmlzaXRvcl9pZCI6IjQ3OTU2NDQ1NTkwNDY4NjkzMzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3bbd35c42afc128e27fc5697217248efd93bf6543cd9d274e16bae0c61068036 |
| hovercard-subject-tag | issue:2214892278 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/dnsjava/dnsjava/318/issue_layout |
| twitter:image | https://opengraph.githubassets.com/40e65e036f47df1190b8d30db4b2753ae9d5f0cc06059f5c438a9a2272ccc30d/dnsjava/dnsjava/issues/318 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/40e65e036f47df1190b8d30db4b2753ae9d5f0cc06059f5c438a9a2272ccc30d/dnsjava/dnsjava/issues/318 |
| og:image:alt | in NioUdpClient.sendrecv method, when IOException happened,channel will be closed,so the os can reuse the udp port. but, when execute "selector.wakeup();" , it may throw a InternalError which is a ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | goodjin |
| hostname | github.com |
| expected-hostname | github.com |
| None | c214754a6652274794ed4e054a7b71be999d69843f103ba54893001d45010ece |
| turbo-cache-control | no-preview |
| go-import | github.com/dnsjava/dnsjava git https://github.com/dnsjava/dnsjava.git |
| octolytics-dimension-user_id | 6755615 |
| octolytics-dimension-user_login | dnsjava |
| octolytics-dimension-repository_id | 17084567 |
| octolytics-dimension-repository_nwo | dnsjava/dnsjava |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 17084567 |
| octolytics-dimension-repository_network_root_nwo | dnsjava/dnsjava |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7d164a4e71eb333b2b17fd5b17e18efb7855505c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width