Skip to content
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

Exception when using R25 with kernel "backend socket" setting #320

Open
nhpip opened this issue Sep 1, 2022 · 2 comments
Open

Exception when using R25 with kernel "backend socket" setting #320

nhpip opened this issue Sep 1, 2022 · 2 comments

Comments

@nhpip
Copy link

nhpip commented Sep 1, 2022

Running version 1.2.0

Looking at ssl.recv it expects a record #sslsocket{}, clearly that's not the case here.

Possible Erlang bug?

%FunctionClauseError{
  args: nil,
  arity: 3,
  clauses: nil,
  function: :recv,
  kind: nil,
  module: :ssl
}
Stack trace:
[
  {:ssl, :recv,
   [
     {:"$inet", :gen_tcp_socket,
      {#PID<0.2479.0>, {:"$socket", #Reference<0.1046277591.1572208641.9904>}}},
     0,
     1200000
   ], [file: 'ssl.erl', line: 885]},
  {:gen_smtp_client, :read_possible_multiline_reply, 1,
   [
     file: '/collection_server/src/collection_server/deps/gen_smtp/src/gen_smtp_client.erl',
     line: 839
   ]},
  {:gen_smtp_client, :connect, 2,
   [
     file: '/collection_server/src/collection_server/deps/gen_smtp/src/gen_smtp_client.erl',
     line: 822
   ]},
  {:gen_smtp_client, :open_smtp_session, 2,
   [
     file: '/collection_server/src/collection_server/deps/gen_smtp/src/gen_smtp_client.erl',
     line: 378
   ]},
  {:gen_smtp_client, :try_smtp_sessions, 3,
   [
     file: '/collection_server/src/collection_server/deps/gen_smtp/src/gen_smtp_client.erl',
     line: 316
   ]},
  {:gen_smtp_client, :send_it, 2,
   [
     file: '/collection_server/src/collection_server/deps/gen_smtp/src/gen_smtp_client.erl',
     line: 289
   ]},
@seriyps
Copy link
Collaborator

seriyps commented Sep 1, 2022

I think it's because we have explicit is_port(Sock) here

recv(Socket, Length, Timeout) when is_port(Socket) ->

@nhpip
Copy link
Author

nhpip commented Sep 6, 2022

So I did a quick experiment and it seemed to get it working. Probably needs more extensive tests, especially on pre-R24/R25:
nhpip@db38e85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants