)]}'
{
  "commit": "b8f7e5b3e79b033115ba536b726508f81a237eb8",
  "tree": "bd4c63776ba9a19590e92f958451e53ee1bc967a",
  "parents": [
    "f06db1b067ab31e79b13ba7d0a3827c58d6767e1"
  ],
  "author": {
    "name": "Dmytro Shteflyuk",
    "email": "kpumuk@kpumuk.info",
    "time": "Wed Nov 19 19:29:09 2025 -0500"
  },
  "committer": {
    "name": "Jens Geyer",
    "email": "Jens-G@users.noreply.github.com",
    "time": "Tue Dec 16 23:40:45 2025 +0100"
  },
  "message": "Fixed \u0027#to_io gives NilClass\u0027 error\n\nIn a race condition in Thrift::NonblockingServer, the following sequence could occur:\n\n1. server transport checked for closure (@server_transport.closed?\n   returns false)\n2. another thread calls server.shutdown\n3. yet another thread, scheduled from #shutdown, calls #close on the\n   server transport, which also sets @handle to nil\n4. back in the first thread, #to_io is called on the server transport,\n   which now returns @handle as nil, causing an error:\n\n  1) NonblockingServer Thrift::NonblockingServer should shut down when asked\n     Failure/Error: rd, \u003d select([@server_transport], nil, nil, 0.1)\n\n     TypeError:\n       can\u0027t convert SpecServerSocket to IO (SpecServerSocket#to_io gives NilClass)\n     # ./lib/thrift/server/nonblocking_server.rb:48:in `select\u0027\n     # ./lib/thrift/server/nonblocking_server.rb:48:in `block in serve\u0027\n     # ./lib/thrift/server/nonblocking_server.rb:45:in `loop\u0027\n     # ./lib/thrift/server/nonblocking_server.rb:45:in `serve\u0027\n     # ./spec/nonblocking_server_spec.rb:116:in `block (4 levels) in \u003ctop (required)\u003e\u0027\n\nThis patch changes Thrift::ServerSocket#to_io to raise IOError if\n@handle is nil, which is the expected behavior for closed streams in Ruby:\n\n  require \u0027socket\u0027\n  server \u003d TCPServer.new(\u0027localhost\u0027, 55554)\n  server.close\n  select([server], nil, nil, 0.1)\n  # \u003d\u003e IOError: closed stream\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3b85b89e22652304ed966b7196ed9b6a8bcfed76",
      "old_mode": 33188,
      "old_path": "lib/rb/lib/thrift/transport/server_socket.rb",
      "new_id": "60e4b8a105ebf47fd73ba3c522826fd91a0cff50",
      "new_mode": 33188,
      "new_path": "lib/rb/lib/thrift/transport/server_socket.rb"
    }
  ]
}
