aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/transport
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2015-06-19 01:35:07 +0200
committerAnders Svensson <[email protected]>2015-06-19 03:03:14 +0200
commit29d23ca325f52c86517f1c6d0b53328c14e4af65 (patch)
treeb747befdbdfbeb61b3cda82d7da4b6cbc0721fb0 /lib/diameter/src/transport
parent1d3827223b0c4174ab39fa6af3e969e4a62f598f (diff)
downloadotp-29d23ca325f52c86517f1c6d0b53328c14e4af65.tar.gz
otp-29d23ca325f52c86517f1c6d0b53328c14e4af65.tar.bz2
otp-29d23ca325f52c86517f1c6d0b53328c14e4af65.zip
Simplify socket close at terminate
The existing code was a remnant of the pre-peeloff implementation. There's no need to close anything but the whole socket.
Diffstat (limited to 'lib/diameter/src/transport')
-rw-r--r--lib/diameter/src/transport/diameter_sctp.erl16
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/diameter/src/transport/diameter_sctp.erl b/lib/diameter/src/transport/diameter_sctp.erl
index 51b4858ab0..7e54acaa01 100644
--- a/lib/diameter/src/transport/diameter_sctp.erl
+++ b/lib/diameter/src/transport/diameter_sctp.erl
@@ -285,12 +285,6 @@ i({K, Ref}, #transport{mode = {accept, _},
x(T)
end.
-%% close/2
-
-close(Sock, Id) ->
- gen_sctp:eof(Sock, #sctp_assoc_change{assoc_id = Id}).
-%% Having to pass a record here is hokey.
-
%% listener/2
%% Accepting processes can be started concurrently: ensure only one
@@ -462,16 +456,6 @@ code_change(_, State, _) ->
terminate(_, #transport{assoc_id = undefined}) ->
ok;
-terminate(_, #transport{socket = Sock,
- mode = accept,
- assoc_id = Id}) ->
- close(Sock, Id);
-
-terminate(_, #transport{socket = Sock,
- mode = {accept, _},
- assoc_id = Id}) ->
- close(Sock, Id);
-
terminate(_, #transport{socket = Sock}) ->
gen_sctp:close(Sock);