diff options
Diffstat (limited to 'Sluift/SluiftComponent.cpp')
-rw-r--r-- | Sluift/SluiftComponent.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Sluift/SluiftComponent.cpp b/Sluift/SluiftComponent.cpp index e1d1738..126562e 100644 --- a/Sluift/SluiftComponent.cpp +++ b/Sluift/SluiftComponent.cpp @@ -1,3 +1,3 @@ /* - * Copyright (c) 2014-2016 Isode Limited. + * Copyright (c) 2014-2018 Isode Limited. * All rights reserved. @@ -43,2 +43,5 @@ SluiftComponent::~SluiftComponent() { void SluiftComponent::connect(const std::string& host, int port) { + if (component->isActive()) { + throw Lua::Exception("Component is already connecting or connected"); + } disconnectedError = boost::optional<ComponentError>(); |