Permalink
Browse files

Fix testAppweb -d 4 - locking in httpCreate

  • Loading branch information...
Embedthis Software
Embedthis Software committed Sep 4, 2012
1 parent 8dafa9f commit 426f0e02e7df4e4c14099afbec3e18bd0fa73d8d
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/deps/http/httpLib.c
View
@@ -4395,10 +4395,13 @@ Http *httpCreate()
Http *http;
HttpStatusCode *code;
+ mprGlobalLock();
if (MPR->httpService) {
+ mprGlobalUnlock();
return MPR->httpService;
}
if ((http = mprAllocObj(Http, manageHttp)) == 0) {
+ mprGlobalUnlock();
return 0;
}
MPR->httpService = http;
@@ -4442,6 +4445,7 @@ Http *httpCreate()
mprSetIdleCallback(isIdle);
mprAddTerminator(terminateHttp);
httpDefineRouteBuiltins();
+ mprGlobalUnlock();
return http;
}

0 comments on commit 426f0e0

Please sign in to comment.