From 95ec880abbde95bcf655421cd7df9927a3cbf194 Mon Sep 17 00:00:00 2001 From: Lukasz Wojciechowski Date: Tue, 30 Jan 2018 11:07:00 +0100 Subject: [PATCH] Fix Guard requests collection with mutex Change-Id: I580c7f44f6c412908b09f595f4eed768dca30b0a Signed-off-by: Lukasz Wojciechowski --- requests/requests.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requests/requests.go b/requests/requests.go index 3f8d9a2..de4fb44 100644 --- a/requests/requests.go +++ b/requests/requests.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2017-2018 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -82,8 +82,8 @@ func (reqs *ReqsCollection) NewRequest(caps Capabilities, // TODO(mwereski): Check if capabilities can be satisfied. - reqs.queue.pushRequest(req) reqs.mutex.Lock() + reqs.queue.pushRequest(req) reqs.requests[req.ID] = req reqs.mutex.Unlock() -- 2.7.4