       (deliver blocked-promise msg))))
 
 (defn on-connect
-  [session _jetty-ws-session]
+  [session ^WebSocketSession jetty-ws-session]
+  (.setMaxTextMessageSize (.getPolicy jetty-ws-session)
+                          655360)
   (send-packet session "nick" {:name "hillbot v2"}))
 
 (defn on-receive

            [gniazdo.core :as ws]
            [org.timmc.heim-logger.common :as cm])
  (:import (clojure.lang ExceptionInfo)
           (java.util.concurrent.atomic AtomicLong)))

(defn ssocket
  "Get the socket from a session."


(def blocking-call-timeout-ms
  "How many milliseconds to wait, maximum, on a blocking call."
  60000)

(defn now<-call-command-blocking-start
  "Redefable time lookup."
