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.
The docs state
https://github.com/jaspervdj/websockets/blob/ff17c79840997dfa50e0854edcd239e3294dc950/src/Network/WebSockets/Server.hs#L203
But the linked
close
works onStream
s notPendingConnection
s. To get aPendingConnection
'sStream
you must usependingStream
which is only exported byNetwork.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.