Signed-off-by: Darren Shepherd <darren@rancher.com>
| ... | ... |
@@ -39,10 +39,12 @@ func NewServer(proto, addr string, job *engine.Job) (Server, error) {
|
| 39 | 39 |
} |
| 40 | 40 |
|
| 41 | 41 |
// Called through eng.Job("acceptconnections")
|
| 42 |
-func AcceptConnections(job *engine.Job) engine.Status {
|
|
| 42 |
+func AcceptConnections(job *engine.Job) error {
|
|
| 43 | 43 |
// close the lock so the listeners start accepting connections |
| 44 |
- if activationLock != nil {
|
|
| 44 |
+ select {
|
|
| 45 |
+ case <-activationLock: |
|
| 46 |
+ default: |
|
| 45 | 47 |
close(activationLock) |
| 46 | 48 |
} |
| 47 |
- return engine.StatusOK |
|
| 49 |
+ return nil |
|
| 48 | 50 |
} |