jaspervdj / websockets

A Haskell library for creating WebSocket-capable servers
http://jaspervdj.be/websockets
BSD 3-Clause "New" or "Revised" License
407 stars 114 forks source link

Docs are not clear how to close PendingConnection #209

Closed 3noch closed 11 months ago

3noch commented 4 years ago

The docs state

https://github.com/jaspervdj/websockets/blob/ff17c79840997dfa50e0854edcd239e3294dc950/src/Network/WebSockets/Server.hs#L203

But the linked close works on Streams not PendingConnections. To get a PendingConnection's Stream you must use pendingStream which is only exported by Network.WebSockets.Connection which has a scary warning at the top that you shouldn't use be importing it unless you know what you're doing.