Fix error handling

This commit is contained in:
Neil Alexander 2020-09-03 14:58:31 +01:00
parent 298a14cf33
commit 0bb698098c
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -104,7 +104,7 @@ func (r *Inputer) InputRoomEvents(
ctx context.Context, ctx context.Context,
request *api.InputRoomEventsRequest, request *api.InputRoomEventsRequest,
response *api.InputRoomEventsResponse, response *api.InputRoomEventsResponse,
) (err error) { ) error {
// Create a wait group. Each task that we dispatch will call Done on // Create a wait group. Each task that we dispatch will call Done on
// this wait group so that we know when all of our events have been // this wait group so that we know when all of our events have been
// processed. // processed.
@ -150,7 +150,7 @@ func (r *Inputer) InputRoomEvents(
// that back to the caller. // that back to the caller.
for _, task := range tasks { for _, task := range tasks {
if task.err != nil { if task.err != nil {
return err return task.err
} }
} }
return nil return nil