Re-use the TLSSock argument in tls:send/2 (EJAB-1327)

This commit is contained in:
Andreas Köhler 2010-10-22 19:35:25 +02:00 committed by Badlop
parent 23db206ea1
commit 9da45d40c7
1 changed files with 2 additions and 2 deletions

View File

@ -198,7 +198,7 @@ recv_data1(#tlssock{tcpsock = TCPSocket, tlsport = Port}, Packet) ->
{error, binary_to_list(Error)}
end.
send(#tlssock{tcpsock = TCPSocket, tlsport = Port}, Packet) ->
send(#tlssock{tcpsock = TCPSocket, tlsport = Port} = TLSSock, Packet) ->
case port_control(Port, ?SET_DECRYPTED_OUTPUT, Packet) of
<<0>> ->
%?PRINT("OUT: ~p~n", [{TCPSocket, lists:flatten(Packet)}]),
@ -215,7 +215,7 @@ send(#tlssock{tcpsock = TCPSocket, tlsport = Port}, Packet) ->
{timeout, _Timer, _} ->
{error, timeout}
after 100 ->
send(#tlssock{tcpsock = TCPSocket, tlsport = Port}, Packet)
send(TLSSock, Packet)
end
end.