There were three important errors. The first is on the spec for
tcp_to_tls, which enforced the opts to be key-value pairs, but then we
can obviously pass single atoms like connect, or compression_none.
Then recv_and_loop said the last argument to be just an integer(),
when it was supposed to be a timeout(). And last, erlang:load_nif/1
does not return anything like {error, already_loaded}.
The other changes are just for readability, specs had really strange
indentation.
There were three important errors. The first is on the spec for
tcp_to_tls
, which enforced the opts to be key-value pairs, but then we can obviously pass single atoms likeconnect
, orcompression_none
. Thenrecv_and_loop
said the last argument to be just aninteger()
, when it was supposed to be atimeout()
. And last,erlang:load_nif/1
does not return anything like{error, already_loaded}
.The other changes are just for readability, specs had really strange indentation.