# IRC Connection reset by peer

**URL:** <https://discuss.dev.twitch.com/t/irc-connection-reset-by-peer/11278>\
**Category:** Chat and IRC\
**Created:** [August 1, 2017, 11:18pm UTC](https://discuss.dev.twitch.com/t/irc-connection-reset-by-peer/11278 "2017-08-01T23:18:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mca64](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@mca64](https://discuss.dev.twitch.com/u/mca64)\
**Post date:** [August 1, 2017, 11:18pm UTC](https://discuss.dev.twitch.com/t/irc-connection-reset-by-peer/11278/1 "2017-08-01T23:18:44Z")

</div>

In last few days i get disconnect wwithin few seconds after join a channel . Im using custom IRC and it worked for years.

> PASS oauth:xxx  
> NICK mca64  
> USER 0 \* :  
> CAP REQ :twitch.tv/membership  
> CAP REQ :twitch.tv/commands  
> JOIN #skryoo1004  
> 001 mca64 :Welcome, GLHF!  
> 002 mca64 :Your host is [tmi.twitch.tv](http://tmi.twitch.tv)  
> \*\*\* 01:18:04 Połączono z #skryoo1004  
> 003 mca64 :This server is rather new  
> 004 mca64 :-  
> 375 mca64 :-  
> 372 mca64 :You are in a maze of twisty passages, all alike.  
> 376 mca64 :\>  
> CAP \* ACK :twitch.tv/membership  
> CAP \* ACK :twitch.tv/commands  
> JOIN #skryoo1004  
> \*\*\* 01:18:04 Dołączył: mca64  
> 353 mca64 = #skryoo1004 :mca64  
> 366 mca64 #skryoo1004 :End of /NAMES list  
> USERSTATE #skryoo1004  
> ROOMSTATE #skryoo1004  
> PRIVMSG #skryoo1004 :yeah i thought you can still do 5:3 in remastered  
> \<01:18:07\> trippylee: yeah i thought you can still do 5:3 in remastered  
> PRIVMSG #skryoo1004 :probably switched back to old graphics because this is a more serious game Kappa  
> \<01:18:11\> marisa46: probably switched back to old graphics because this is a more serious game Kappa  
> PRIVMSG #skryoo1004 :is this a TheClaude stream?  
> \<01:18:13\> langrisser: is this a TheClaude stream?

Please help

---

<div class="post-metadata">

**Author:** ![Alca](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/alca/32/2783_2.png) [@Alca](https://discuss.dev.twitch.com/u/Alca)\
**Post date:** [August 2, 2017, 7:32am UTC](https://discuss.dev.twitch.com/t/irc-connection-reset-by-peer/11278/2 "2017-08-02T07:32:15Z")

</div>

In general, `CAP REQ` should come first and they can be combined. `USER` is not required. You should wait for at least the `001` command before sending `JOIN` commands

```auto
< CAP REQ :twitch.tv/membership twitch.tv/commands
> :tmi.twitch.tv CAP * ACK :twitch.tv/membership twitch.tv/commands
< PASS oauth:token_here
< NICK username_here
> :tmi.twitch.tv 001 username_here :Welcome, GLHF!
  :tmi.twitch.tv 002 username_here :Your host is tmi.twitch.tv
  :tmi.twitch.tv 003 username_here :This server is rather new
  :tmi.twitch.tv 004 username_here :-
  :tmi.twitch.tv 375 username_here :-
  :tmi.twitch.tv 372 username_here :You are in a maze of twisty passages, all alike.
  :tmi.twitch.tv 376 username_here :>
> :tmi.twitch.tv GLOBALUSERSTATE
< JOIN #channel_name

```

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 2, 2017, 7:45am UTC](https://discuss.dev.twitch.com/t/irc-connection-reset-by-peer/11278/3 "2017-08-02T07:45:41Z")

</div>

Are you PING/PONG-ing and in the event Twitch is not sending a PING, in a nice time, are you proactively sending a PING and listening for the PONG?

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [September 1, 2017, 7:45am UTC](https://discuss.dev.twitch.com/t/irc-connection-reset-by-peer/11278/4 "2017-09-01T07:45:44Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
