Closed GoogleCodeExporter closed 9 years ago
(side note: Please try to keep issues with the project in the mailing list or
the Issue tracker. I honestly don't check Google+ that often)
I ran the example bot with a 1 second socket timeout and restarted my router
but an unable to reproduce that error (problem with the snapshot you were
using?). I get the expected exception
20:41:26.739 [main] INFO org.pircbotx.output.OutputRaw - PING 1372207286
20:41:27.741 [main] INFO org.pircbotx.InputParser - :calvino.freenode.net PONG
calvino.freenode.net :1372207286
... Internet disconnected ...
20:41:28.743 [main] INFO org.pircbotx.output.OutputRaw - PING 1372207288
20:41:30.745 [main] INFO org.pircbotx.output.OutputRaw - PING 1372207290
20:41:32.747 [main] INFO org.pircbotx.output.OutputRaw - PING 1372207292
20:41:34.750 [main] INFO org.pircbotx.output.OutputRaw - PING 1372207294
20:41:36.753 [main] INFO org.pircbotx.output.OutputRaw - PING 1372207296
20:41:38.755 [main] INFO org.pircbotx.output.OutputRaw - PING 1372207298
20:41:40.466 [main] ERROR org.pircbotx.PircBotX - Exception encountered when
reading next line from server
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:189) ~[na:1.7.0_21]
at java.net.SocketInputStream.read(SocketInputStream.java:121) ~[na:1.7.0_21]
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283) ~[na:1.7.0_21]
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325) ~[na:1.7.0_21]
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177) ~[na:1.7.0_21]
at java.io.InputStreamReader.read(InputStreamReader.java:184) ~[na:1.7.0_21]
at java.io.BufferedReader.fill(BufferedReader.java:154) ~[na:1.7.0_21]
at java.io.BufferedReader.readLine(BufferedReader.java:317) ~[na:1.7.0_21]
at java.io.BufferedReader.readLine(BufferedReader.java:382) ~[na:1.7.0_21]
at org.pircbotx.PircBotX.startLineProcessing(PircBotX.java:237) [classes/:na]
at org.pircbotx.PircBotX.connect(PircBotX.java:223) [classes/:na]
at org.pircbotx.PircBotX.startBot(PircBotX.java:140) [classes/:na]
at org.pircbotx.impl.PircBotXExample.main(PircBotXExample.java:203) [test-classes/:na]
20:41:40.489 [main] INFO org.pircbotx.dcc.DccHandler - Terminating all
transfers waiting to be accepted
20:41:40.489 [main] DEBUG org.pircbotx.PircBotX - Disconnected.
20:41:40.489 [main] DEBUG o.p.h.m.ThreadedListenerManager - Waiting for
listener org.pircbotx.hooks.CoreHooks@6835449e to execute event
DisconnectEvent(daoSnapshot=org.pircbotx.snapshot.UserChannelDaoSnapshot@7b862bd
b)
However I will say that any output that is pending to be sent but fails WILL
throw an exception because there's nothing that send() can do about it.
Original comment by Lord.Qua...@gmail.com
on 26 Jun 2013 at 12:48
Closer inspection of this led me to see it is not the startBot() / connect()
methods throwing the exceptions but send().
I guess I need better exception handling there, however, i'm not sure the bot
was reconnecting either. I'll look into this more and get back to you if there
is an actual problem.
Original comment by Jamie.Re...@gmail.com
on 27 Jun 2013 at 7:11
Original issue reported on code.google.com by
Jamie.Re...@gmail.com
on 19 Jun 2013 at 3:31