clj-commons / aleph

Asynchronous streaming communication for Clojure - web server, web client, and raw TCP/UDP
http://aleph.io
MIT License
2.54k stars 241 forks source link

Improve raw-stream example #533

Closed rafd closed 4 years ago

rafd commented 4 years ago

Minor tweak to :raw-stream? example to prevent future readers from following the example directly and ending up with a program that creates a connection-pool on every request (...eventually consuming all threads on the OS).

kachayev commented 4 years ago

Good catch @rafd, thanks! def also would not work for applications, as you need something like components to manage resources properly. Tho' I agree it's still less harmful compared to current version.

kachayev commented 4 years ago

There's another connection pool (in the same file) created the same way. Let me update the PR.