Skip to content

Commit 69a9eda

Browse files
committed
Remove duplicate calls to On_Close and Shutdown.
Both routines are called as part of WebSocket_Exception. Continued work for U504-028.
1 parent d50f0ab commit 69a9eda

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/core/aws-net-websocket-registry.adb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------------------------------------------------------
22
-- Ada Web Server --
33
-- --
4-
-- Copyright (C) 2012-2019, AdaCore --
4+
-- Copyright (C) 2012-2021, AdaCore --
55
-- --
66
-- This library is free software; you can redistribute it and/or modify --
77
-- it under terms of the GNU General Public License as published by the --
@@ -371,7 +371,6 @@ package body AWS.Net.WebSocket.Registry is
371371
Do_Unregister (WS);
372372
WebSocket_Exception
373373
(WS, Exception_Message (E), Protocol_Error);
374-
WS.On_Close (Exception_Message (E));
375374
WS.Shutdown;
376375
end;
377376
end;
@@ -917,7 +916,6 @@ package body AWS.Net.WebSocket.Registry is
917916
(WS, Exception_Message (E), Protocol_Error);
918917

919918
WS.Close (Exception_Message (E), Going_Away);
920-
WS.On_Close (Exception_Message (E));
921919

922920
-- No more data to send from this socket
923921
Pending := 0;
@@ -977,7 +975,6 @@ package body AWS.Net.WebSocket.Registry is
977975
WebSocket_Exception
978976
(WebSocket, Exception_Message (E), Protocol_Error);
979977

980-
WebSocket.On_Close (Exception_Message (E));
981978
WebSocket.Close (Exception_Message (E), Going_Away);
982979
end;
983980

0 commit comments

Comments
 (0)