Application: do not delete port owned by app_server

Change-Id: I99dbee8ed7900eda8bf0024e0893449e1b217255
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8516
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
X512 2024-10-31 05:40:42 +09:00 committed by waddlesplash
parent c65ff9f1e0
commit 30be30f25d

View File

@ -337,7 +337,7 @@ BApplication::~BApplication()
link.StartMessage(B_QUIT_REQUESTED);
link.Flush();
}
delete_port(fServerLink->SenderPort());
// the sender port belongs to the app_server
delete_port(fServerLink->ReceiverPort());
delete fServerLink;
#endif // RUN_WITHOUT_APP_SERVER
@ -1465,7 +1465,7 @@ BApplication::_ConnectToServer()
void
BApplication::_ReconnectToServer()
{
delete_port(fServerLink->SenderPort());
// the sender port belongs to the app_server
delete_port(fServerLink->ReceiverPort());
if (_ConnectToServer() != B_OK)