MCPcopy Create free account
hub / github.com/Effect-TS/effect / overflow

Function overflow

packages/effect/src/socket/Socket.ts:1052–1067  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1050 }
1051
1052 function overflow() {
1053 overflowed = true
1054 fail(
1055 new SocketError({
1056 reason: new SocketReadError({
1057 cause: new Error(`Socket highWaterMark of ${highWaterMark} bytes exceeded`)
1058 })
1059 })
1060 )
1061 try {
1062 ws.close(1008, "Inbound message buffer limit exceeded")
1063 } catch {
1064 // global WebSocket clients only accept 1000 and 3000-4999
1065 ws.close()
1066 }
1067 }
1068
1069 function fail(err: SocketError) {
1070 if (error === undefined) error = err

Callers 1

pushFunction · 0.85

Calls 2

failFunction · 0.70
closeMethod · 0.65

Tested by

no test coverage detected