Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Bug #36731. #36880

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix for Bug #36731. #36880

wants to merge 1 commit into from

Conversation

pidarped
Copy link
Contributor

Add CloseActiveConnections() call in TCPBase::Close(), which is called as part of Server::Shutdown().
Active connections should be closed as part of Server shutdown. This allows the TCPConnectionState to also close the associated TCPEndpoint object as part of this shutdown flow.

Previously, the CloseActiveConnections() call was present in the TCPBase destructor alone.

Add CloseActiveConnections() call in TCPBase::Close(), which
is called as part of Server::Shutdown().
Active connections should be closed as part of Server shutdown.
This allows the TCPConnectionState to also close the associated
TCPEndpoint object as part of this shutdown flow.

Previously, the CloseActiveConnections() call was present in the
TCPBase destructor alone.
Copy link

Review changes with  SemanticDiff

Copy link

github-actions bot commented Dec 18, 2024

PR #36880: Size comparison from 37fa873 to 361adab

Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 37fa873 361adab change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1353786 1353786 0 0.0
RAM 104136 104136 0 0.0
bl702 lighting-app bl702+eth FLASH 651960 651960 0 0.0
RAM 25353 25353 0 0.0
bl702+wifi FLASH 829548 829548 0 0.0
RAM 14093 14093 0 0.0
bl706+mfd+rpc+littlefs FLASH 1058020 1058020 0 0.0
RAM 23933 23933 0 0.0
bl702l lighting-app bl702l+mfd+littlefs FLASH 979394 979394 0 0.0
RAM 16596 16596 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 839968 839976 8 0.0
RAM 123672 123672 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 825492 825500 8 0.0
RAM 125560 125560 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 772372 772380 8 0.0
RAM 114036 114036 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 756560 756568 8 0.0
RAM 114236 114236 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 539853 539861 8 0.0
RAM 205776 205776 0 0.0
lock CC3235SF_LAUNCHXL FLASH 574149 574157 8 0.0
RAM 205920 205920 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 681737 681737 0 0.0
RAM 78732 78732 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 701589 701589 0 0.0
RAM 81372 81372 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 701589 701589 0 0.0
RAM 81372 81372 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 658517 658517 0 0.0
RAM 73800 73800 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 618353 618353 0 0.0
RAM 71724 71724 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 637981 637981 0 0.0
RAM 74268 74268 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 637981 637981 0 0.0
RAM 74268 74268 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 637753 637753 0 0.0
RAM 74732 74732 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 657461 657461 0 0.0
RAM 77276 77276 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 657461 657461 0 0.0
RAM 77276 77276 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 614205 614205 0 0.0
RAM 68820 68820 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 634065 634065 0 0.0
RAM 71452 71452 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 634065 634065 0 0.0
RAM 71452 71452 0 0.0
efr32 lock-app BRD4187C FLASH 932620 932620 0 0.0
RAM 160204 160204 0 0.0
BRD4338a FLASH 746584 746584 0 0.0
RAM 233332 233332 0 0.0
window-app BRD4187C FLASH 1025232 1025224 -8 -0.0
RAM 128308 128308 0 0.0
esp32 all-clusters-app c3devkit DRAM 95376 95376 0 0.0
FLASH 1543590 1543590 0 0.0
IRAM 82542 82542 0 0.0
m5stack DRAM 116320 116320 0 0.0
FLASH 1550190 1550190 0 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4720 4720 0 0.0
FLASH 2716225 2716249 24 0.0
RAM 129928 129928 0 0.0
all-clusters-app debug unknown 5560 5560 0 0.0
FLASH 6009536 6009560 24 0.0
RAM 523640 523640 0 0.0
all-clusters-minimal-app debug unknown 5456 5456 0 0.0
FLASH 5346044 5346068 24 0.0
RAM 242728 242728 0 0.0
bridge-app debug unknown 5440 5440 0 0.0
FLASH 4685580 4685604 24 0.0
RAM 218528 218528 0 0.0
chip-tool debug unknown 5992 5992 0 0.0
FLASH 12849428 12849452 24 0.0
RAM 582506 582506 0 0.0
chip-tool-ipv6only arm64 unknown 21352 21352 0 0.0
FLASH 10984032 10984064 32 0.0
RAM 633432 633432 0 0.0
fabric-admin debug unknown 5816 5816 0 0.0
FLASH 11255977 11256001 24 0.0
RAM 582850 582850 0 0.0
fabric-bridge-app debug unknown 4696 4696 0 0.0
FLASH 4511112 4511136 24 0.0
RAM 205696 205696 0 0.0
fabric-sync debug unknown 4936 4936 0 0.0
FLASH 5611173 5611189 16 0.0
RAM 472696 472696 0 0.0
lighting-app debug+rpc+ui unknown 6104 6104 0 0.0
FLASH 5622305 5622337 32 0.0
RAM 228888 228888 0 0.0
lock-app debug unknown 5376 5376 0 0.0
FLASH 4734852 4734876 24 0.0
RAM 204872 204872 0 0.0
ota-provider-app debug unknown 4752 4752 0 0.0
FLASH 4360558 4360582 24 0.0
RAM 198560 198560 0 0.0
ota-requestor-app debug unknown 4688 4688 0 0.0
FLASH 4499582 4499606 24 0.0
RAM 203144 203144 0 0.0
shell debug unknown 4248 4248 0 0.0
FLASH 3033469 3033485 16 0.0
RAM 160552 160552 0 0.0
thermostat-no-ble arm64 unknown 9552 9552 0 0.0
FLASH 4104832 4104848 16 0.0
RAM 243168 243168 0 0.0
tv-app debug unknown 5704 5704 0 0.0
FLASH 5960165 5960181 16 0.0
RAM 596128 596128 0 0.0
tv-casting-app debug unknown 5288 5288 0 0.0
FLASH 11055821 1105583 16 0.0
RAM 692328 692328 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 918112 918112 0 0.0
RAM 143308 143308 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 890256 890256 0 0.0
RAM 141495 141495 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 851992 851992 0 0.0
RAM 142220 142220 0 0.0
nxp contact k32w0+release FLASH 585624 585624 0 0.0
RAM 71088 71088 0 0.0
mcxw71+release FLASH 600320 600320 0 0.0
RAM 63184 63184 0 0.0
light k32w0+release FLASH 612548 612548 0 0.0
RAM 70480 70480 0 0.0
k32w1+release FLASH 686808 686808 0 0.0
RAM 48816 48816 0 0.0
lock mcxw71+release FLASH 763216 763216 0 0.0
RAM 70852 70852 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1647132 1647148 16 0.0
RAM 212104 212104 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1554564 1554580 16 0.0
RAM 208920 208920 0 0.0
light cy8ckit_062s2_43012 FLASH 1469884 1469884 0 0.0
RAM 200888 200888 0 0.0
lock cy8ckit_062s2_43012 FLASH 1467604 1467620 16 0.0
RAM 225248 225248 0 0.0
qpg lighting-app qpg6105+debug FLASH 664288 664288 0 0.0
RAM 105432 105432 0 0.0
lock-app qpg6105+debug FLASH 622108 622108 0 0.0
RAM 99884 99884 0 0.0
stm32 light STM32WB5MM-DK FLASH 485004 485004 0 0.0
RAM 144888 144888 0 0.0
telink bridge-app tlsr9258a FLASH 683206 683206 0 0.0
RAM 91224 91224 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 623620 623620 0 0.0
RAM 31456 31456 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 772438 772438 0 0.0
RAM 49316 49316 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 711060 711060 0 0.0
RAM 73520 73520 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 628076 628076 0 0.0
RAM 142156 142156 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 814094 814094 0 0.0
RAM 99700 99700 0 0.0
tizen all-clusters-app arm unknown 4996 4996 0 0.0
FLASH 1734952 1734968 16 0.0
RAM 90788 90788 0 0.0
chip-tool-ubsan arm unknown 10804 10804 0 0.0
FLASH 17973686 17973766 80 0.0
RAM 7842724 7842764 40 0.0

@@ -125,6 +125,9 @@ void TCPBase::Close()
mListenSocket->Free();
mListenSocket = nullptr;
}

CloseActiveConnections();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the destructor should call Close() instead of us copy/pasting everything between them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants