Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@
public abstract class ServerKeywordExecutable<OPTS extends ServerOpts>
extends BaseKeywordExecutable<OPTS> {

private final ServerContext context;
private ServerContext context;

public ServerKeywordExecutable(OPTS options) {
super(options);
context = new ServerContext(SiteConfiguration.auto());
}

public ServerContext getServerContext() {
public synchronized ServerContext getServerContext() {
if (context == null) {
context = new ServerContext(SiteConfiguration.auto());
}

if (context.isClosed()) {
throw new IllegalStateException(
"Cannot use context after execute method has completed. Context is closed.");
Expand Down
Loading