[logback-dev] [qos-ch/logback] c9291b: LOGBACK-350 Prevent SocketNode constructor blockin...

Tony Trinh tony19 at gmail.com
Sat Oct 26 02:16:44 CEST 2013


  Branch: refs/heads/master
  Home:   https://github.com/qos-ch/logback
  Commit: c9291b7965429eb86450df28119c85479c3fb2ae
      https://github.com/qos-ch/logback/commit/c9291b7965429eb86450df28119c85479c3fb2ae
  Author: Richard Fearn <richardfearn at gmail.com>
  Date:   2013-10-19 (Sat, 19 Oct 2013)

  Changed paths:
    M logback-classic/src/main/java/ch/qos/logback/classic/net/SocketNode.java

  Log Message:
  -----------
  LOGBACK-350 Prevent SocketNode constructor blocking due to lack of data from client

The constructor creates an ObjectInputStream, and this blocks until the stream
header is received from the client.

If the client doesn't send a stream header, construction of the SocketNode will
hang, preventing SimpleSocketServer from accepting new clients.

This change moves the construction of the ObjectInputStream into
SocketNode.run. As SimpleSocketServer runs this method in a new thread, a rogue
client won't prevent subsequent ones being able to connect.


  Commit: ef839a099ba2c21748d54db049a3cf9ac710590b
      https://github.com/qos-ch/logback/commit/ef839a099ba2c21748d54db049a3cf9ac710590b
  Author: Richard Fearn <richardfearn at gmail.com>
  Date:   2013-10-20 (Sun, 20 Oct 2013)

  Changed paths:
    M logback-classic/src/main/java/ch/qos/logback/classic/net/SocketNode.java

  Log Message:
  -----------
  Mark SocketNode as closed if ObjectInputStream can't be created

This prevents a NullPointerException from being thrown, and allows the
socketNodeClosing method to be called for the SocketNode.


  Commit: 7d4c75c2908c2ba604f4bcdf2ba82b7d23b71462
      https://github.com/qos-ch/logback/commit/7d4c75c2908c2ba604f4bcdf2ba82b7d23b71462
  Author: Tony Trinh <tony19 at gmail.com>
  Date:   2013-10-25 (Fri, 25 Oct 2013)

  Changed paths:
    M logback-classic/src/main/java/ch/qos/logback/classic/net/SocketNode.java

  Log Message:
  -----------
  Merge pull request #155 from richardfearn/LOGBACK-350

LOGBACK-350 Prevent SocketNode constructor blocking due to lack of data from client


Compare: https://github.com/qos-ch/logback/compare/772f7bf5838b...7d4c75c2908c


More information about the logback-dev mailing list