mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
Re-use the TLSSock argument in tls:send/2 (EJAB-1327)
This commit is contained in:
parent
d9ac399c74
commit
1579bf2d18
@ -193,7 +193,7 @@ recv_data1(#tlssock{tcpsock = TCPSocket, tlsport = Port}, Packet) ->
|
|||||||
{error, binary_to_list(Error)}
|
{error, binary_to_list(Error)}
|
||||||
end.
|
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
|
case port_control(Port, ?SET_DECRYPTED_OUTPUT, Packet) of
|
||||||
<<0>> ->
|
<<0>> ->
|
||||||
%?PRINT("OUT: ~p~n", [{TCPSocket, lists:flatten(Packet)}]),
|
%?PRINT("OUT: ~p~n", [{TCPSocket, lists:flatten(Packet)}]),
|
||||||
@ -210,7 +210,7 @@ send(#tlssock{tcpsock = TCPSocket, tlsport = Port}, Packet) ->
|
|||||||
{timeout, _Timer, _} ->
|
{timeout, _Timer, _} ->
|
||||||
{error, timeout}
|
{error, timeout}
|
||||||
after 100 ->
|
after 100 ->
|
||||||
send(#tlssock{tcpsock = TCPSocket, tlsport = Port}, Packet)
|
send(TLSSock, Packet)
|
||||||
end
|
end
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user