Skip to content

Commit

Permalink
Fix UWP Hello server to destroy the communicator
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone committed Apr 20, 2018
1 parent 78a2c6d commit 5f2747c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
12 changes: 8 additions & 4 deletions cpp11/Ice/uwp/hello/server/MainPage.xaml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "pch.h"
#include "MainPage.xaml.h"
#include "Hello.h"
#include <Hello.h>

using namespace std;
using namespace hello;
Expand Down Expand Up @@ -49,10 +49,14 @@ class HelloI : public Hello
}, CallbackContext::Any));
}

virtual void
shutdown(const Ice::Current&)
void shutdown(const ::Ice::Current& current)
{
Application::Current->Exit();
_page->Dispatcher->RunAsync(CoreDispatcherPriority::Normal,
ref new DispatchedHandler([=]()
{
current.adapter->getCommunicator()->destroy();
App::Current->Exit();
}, CallbackContext::Any));
}

private:
Expand Down
1 change: 0 additions & 1 deletion cpp11/Ice/uwp/hello/server/MainPage.xaml.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include "MainPage.g.h"
#include <Ice/Ice.h>
#include <Hello.h>

namespace hello
{
Expand Down

0 comments on commit 5f2747c

Please # to comment.