Skip to content

Commit 28a843b

Browse files
committed
activity: record activity for all messages
1 parent aa83da9 commit 28a843b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

async/Async_OpenFlowChunk.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ module Controller = struct
259259
let open Header in
260260
match evt with
261261
| `Message (c_id, (hdr, bytes)) ->
262+
Handler.activity t c_id;
262263
begin if hdr.Header.type_code = type_code_echo_request then
263264
(* Echo requests get a reply *)
264265
let hdr = { hdr with type_code = type_code_echo_reply } in
@@ -271,11 +272,10 @@ module Controller = struct
271272
* the controller.
272273
* *)
273274
>>| (function _ -> [])
274-
else if hdr.Header.type_code = type_code_echo_reply then begin
275-
(* Echo replies get eaten, after recording activity. *)
276-
Handler.activity t c_id;
275+
else if hdr.Header.type_code = type_code_echo_reply then
276+
(* Echo replies get eaten. The activity has been recorded above. *)
277277
return []
278-
end else
278+
else
279279
(* All other messages get forwarded *)
280280
return [evt]
281281
end

0 commit comments

Comments
 (0)