Skip to content

Commit

Permalink
Avoid crashing shared state owner after reading OS-trusted CAs
Browse files Browse the repository at this point in the history
Specifically, when the file port exits before the OTP code we've invoked
unlinks from it, thus triggering an `EXIT` message (or so I speculate).

Issue report:
* #35
  • Loading branch information
g-andrade committed Jan 17, 2023
1 parent b804fe3 commit 0105d1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed

- (rare?) crash after reading OS-trusted CAs

## [1.17.2] - 2023-01-12

### Fixed
Expand Down
6 changes: 0 additions & 6 deletions src/tls_certificate_check_shared_state.erl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).

Expand Down Expand Up @@ -224,11 +223,6 @@ handle_cast({initialize_shared_state, EncodedHardcodedAuthorities}, State)
handle_cast(Request, State) ->
{stop, {unexpected_cast, Request}, State}.

-spec handle_info(term(), state())
-> {stop, {unexpected_info, term()}, state()}.
handle_info(Info, State) ->
{stop, {unexpected_info, Info}, State}.

-spec terminate(term(), state()) -> ok.
terminate(Reason, _State) ->
ets:delete_all_objects(?INFO_TABLE),
Expand Down

0 comments on commit 0105d1c

Please sign in to comment.