Added all_resources.clear() to ServerBase::start in case server is restarted.

This commit is contained in:
eidheim 2015-01-09 12:27:16 +01:00
commit 0c96e9f845

View file

@ -38,6 +38,7 @@ namespace SimpleWeb {
void start() { void start() {
//All resources with default_resource at the end of vector //All resources with default_resource at the end of vector
//Used in the respond-method //Used in the respond-method
all_resources.clear();
for(auto it=resource.begin(); it!=resource.end();it++) { for(auto it=resource.begin(); it!=resource.end();it++) {
all_resources.push_back(it); all_resources.push_back(it);
} }