Refrain middleware for connect.