       (reconnect ctx host port))
     (exceptionCaught [^ChannelHandlerContext ctx ^Throwable cause]
       (.printSTackTrace cause)
-      (.close ctx))))
+      (.close ctx))
+    (isSharable [] true)))

      )
    (exceptionCaught [^ChannelHandlerContext ctx ^Throwable cause]
      (.printStackTrace cause)
      (.close ctx))))

(defn ^ChannelHandler client-handler [host port]
  (proxy [SimpleChannelInboundHandler ChannelHandler$Sharable] []
    (channelActive [^ChannelHandlerContext ctx])

    (channelRead0 [^ChannelHandlerContext ctx ^Object in]

;; TODO fixed issue of non sharable
(defn ^ChannelHandler server-handler
  [custom-handler]
  (proxy [ChannelInboundHandlerAdapter] []
    (channelRead [^ChannelHandlerContext ctx ^Object msg]
      ;; (prn "Server received: " msg)
      (let [type (.getType msg)
