Skip to content

Commit 9752943

Browse files
committed
.
1 parent 5f76785 commit 9752943

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

lib/php-extension/RequestProcessor.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,9 @@ bool RequestProcessorInstance::RequestInit() {
219219
}
220220
}
221221
#else
222+
// Initialize the request processor only once(lazy) during RINIT because in NTS mode php-fpm forks the main process for workers and we need to load the library after the worker process is forked.
222223
if(!requestProcessor.Init()){
224+
AIKIDO_LOG_ERROR("Failed to initialize Aikido Request Processor!\n");
223225
return false;
224226
}
225227
#endif

lib/request-processor/config/config.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,16 @@ import (
1111
)
1212

1313
func UpdateToken(instance *instance.RequestProcessorInstance, token string) bool {
14+
if instance.GetCurrentToken() == token {
15+
log.Debugf(instance, "Token is the same as previous one, skipping config reload...")
16+
return false
17+
}
18+
1419
server := globals.GetServer(token)
1520
if server == nil {
21+
log.Debugf(instance, "Server not found for token \"AIK_RUNTIME_***%s\"", utils.AnonymizeToken(token))
1622
return false
1723
}
18-
1924
instance.SetCurrentToken(token)
2025
instance.SetCurrentServer(server)
2126
log.Infof(instance, "Token changed to \"AIK_RUNTIME_***%s\"", utils.AnonymizeToken(token))

0 commit comments

Comments
 (0)