Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.net.SocketException - Socket closed #16

Closed
vemv opened this issue Feb 20, 2024 · 0 comments · Fixed by #17
Closed

java.net.SocketException - Socket closed #16

vemv opened this issue Feb 20, 2024 · 0 comments · Fixed by #17

Comments

@vemv
Copy link
Member

vemv commented Feb 20, 2024

I encountered this when:

  • having a nrepl server in iTerm
  • having a successful logjam sesion in a cider-connected Emacs
  • restarting Emacs
  • cider-connecting again to the same nrepl server
  • starting cider-log-mode
1. Caused by java.net.SocketException
   Socket closed

        NioSocketImpl.java:  163  sun.nio.ch.NioSocketImpl/ensureOpenAndConnected
        NioSocketImpl.java:  362  sun.nio.ch.NioSocketImpl/beginWrite
        NioSocketImpl.java:  407  sun.nio.ch.NioSocketImpl/implWrite
        NioSocketImpl.java:  440  sun.nio.ch.NioSocketImpl/write
        NioSocketImpl.java:  819  sun.nio.ch.NioSocketImpl$2/write
               Socket.java: 1195  java.net.Socket$SocketOutputStream/write
 BufferedOutputStream.java:  125  java.io.BufferedOutputStream/flushBuffer
 BufferedOutputStream.java:  252  java.io.BufferedOutputStream/implFlush
 BufferedOutputStream.java:  240  java.io.BufferedOutputStream/flush
             transport.clj:  131  nrepl.transport/bencode/fn
             transport.clj:   34  nrepl.transport.FnTransport/send
                 print.clj:  159  nrepl.middleware.print/send-nonstreamed
                 print.clj:  138  nrepl.middleware.print/send-nonstreamed
                 print.clj:  174  nrepl.middleware.print/printing-transport/reify
                caught.clj:   58  nrepl.middleware.caught/caught-transport/reify
                   log.clj:  158  cider.nrepl.middleware.log/add-consumer-reply/fn
              appender.clj:   42  logjam.appender/notify-consumers
              appender.clj:   38  logjam.appender/notify-consumers
              appender.clj:   70  logjam.appender/add-event
              appender.clj:   64  logjam.appender/add-event
                 Atom.java:   51  clojure.lang.Atom/swap
                  core.clj: 2370  clojure.core/swap!
                  core.clj: 2362  clojure.core/swap!
                timbre.clj:   62  logjam.framework.timbre/add-appender/fn
               timbre.cljc:  777  taoensso.timbre$_log_BANG_$fn__33032/invoke

I reckon that logjam.appender/notify-consumers should guard against disconnected consumers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant