Skip to content

Commit 1cdd747

Browse files
Copilotmikicho
andauthored
docs(http): clarify duplicate socket handling guard
Agent-Logs-Url: https://github.com/mswjs/interceptors/sessions/7b984ca5-b412-4ec5-8fc3-8f490e11d77b Co-authored-by: mikicho <11459632+mikicho@users.noreply.github.com>
1 parent 173c9e6 commit 1cdd747

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/interceptors/http/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ export class HttpRequestInterceptor extends Interceptor<HttpRequestEventMap> {
221221
},
222222
})
223223

224+
/**
225+
* Skip already claimed sockets to avoid duplicate handling when
226+
* multiple interceptors observe the same connection.
227+
*/
224228
if (socketController['readyState'] !== SocketController.PENDING) {
225229
return
226230
}

0 commit comments

Comments
 (0)