Skip to content

Commit e1eb389

Browse files
committed
fix: websocket constructor not being an actual constructor
1 parent 5520abe commit e1eb389

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.changeset/silver-squids-cross.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@systemfsoftware/neon-serverless-adapter": patch
3+
---
4+
5+
fix: websocket constructor not being an actual constructor

packages/neon-serverless-adapter/src/mod.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ export function Adapter<T extends Adapter.TSchema = Record<string, never>>(
4141
const webSocketConstructor = yield* Socket.WebSocketConstructor
4242

4343
yield* Effect.sync(() => {
44-
neon.neonConfig.webSocketConstructor = webSocketConstructor
44+
neon.neonConfig.webSocketConstructor = class {
45+
constructor(url: string) {
46+
return webSocketConstructor(url)
47+
}
48+
}
4549
})
4650

4751
const pool = yield* Effect.sync(() => new neon.Pool({ connectionString }))

0 commit comments

Comments
 (0)