mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Fix race condition during initialization (#163)
Currently, async workers are started before HTTP interface is available
to get their requests. It fixes by ensuring that async workers are
started after HTTP interface is up.
Essentially we are getting rid of an error message during bootstrap:
ERRO[0000] Could not fetch task error=Get http://127.0.0.1:8080/tasks: dial tcp 127.0.0.1:8080: getsockopt: connection refused
This commit is contained in:
committed by
Seif Lotfy سيف لطفي
parent
34b4b25092
commit
df3d5b48ce
@@ -204,7 +204,7 @@ func TestTasksrvURL(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
if got := tasksrvURL(tt.in, tt.port); got != tt.out {
|
||||
if got, _ := tasksrvURL(tt.in, tt.port); got != tt.out {
|
||||
t.Errorf("port: %s\ttasksrv: %s\texpected: %s\tgot: %s", tt.port, tt.in, tt.out, got)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user