Author Topic: Catching Java.net.SocketException Disconnect  (Read 1501 times)

0 Members and 1 Guest are viewing this topic.

Offline Lance

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Catching Java.net.SocketException Disconnect
« on: August 13, 2008, 04:22:11 PM »
Code: [Select]
[14:19:37.728] java.net.SocketException: Connection reset
[14:19:37.744] java.net.SocketInputStream.read(Unknown Source)
[14:19:37.790] java.net.SocketInputStream.read(Unknown Source)
[14:19:37.790] bot.PacketThread.run(PacketThread.java:139)
[14:19:57.712] WARNING: Keepalive failed to send: java.net.SocketException: Socket closed

I'm trying to make a plugin to reconnect my bot after it is disconnected like it was above. When I create PluginMain, what do I need to implement so I may have a method availiable to catch it. Furthermore, what method is it? :p

Thanks.
Quote from: Joe
[23:55:31] [william@enterprise ~/Documents/Programming/javaop2]$ svn commit -m 'Tried to fix StayConnected. Again.'
Committed revision 63.
StayConnected strikes back!

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17928
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Catching Java.net.SocketException Disconnect
« Reply #1 on: August 13, 2008, 08:51:33 PM »
I don't think that's the kind of thing that could be done in a plugin, I think it's something in the core.

(disclaimer: I'm not positive)

Offline Lance

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Re: Catching Java.net.SocketException Disconnect
« Reply #2 on: August 14, 2008, 11:21:14 AM »
I'm going to break JavaOP2. LOL.
Thanks :)
Quote from: Joe
[23:55:31] [william@enterprise ~/Documents/Programming/javaop2]$ svn commit -m 'Tried to fix StayConnected. Again.'
Committed revision 63.
StayConnected strikes back!