Skip to content

Commit

Permalink
Conform OTP 20
Browse files Browse the repository at this point in the history
  • Loading branch information
tank-bohr committed Aug 4, 2019
1 parent d01d453 commit 658f8b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ language: erlang
otp_release:
- 20.3
- 21.3
- 22.0

before_install:
- sudo apt-add-repository --yes ppa:ansible/ansible
Expand Down
5 changes: 5 additions & 0 deletions src/bookish_spork_ssl.erl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@
listen(Port, Options) ->
ssl:listen(Port, Options ++ ?SSL_OPTIONS).

-ifdef(OTP_RELEASE).
accept(ListenSocket) ->
{ok, Socket} = ssl:transport_accept(ListenSocket),
ssl:handshake(Socket).
-else.
accept(ListenSocket) ->
ssl:ssl_accept(ListenSocket).
-endif.

recv(Socket, Length) ->
ssl:recv(Socket, Length).
Expand Down

0 comments on commit 658f8b0

Please sign in to comment.