Comments (2)
Changing these to one-buffered chans resolves the deadlock and makes things work for me. I haven't fully thought through whether there are any other negative consequence, though.
diff --git a/client/connection.go b/client/connection.go
index 0deca91..7d4d694 100644
--- a/client/connection.go
+++ b/client/connection.go
@@ -89,9 +89,9 @@ func Client(nick, ident, name string, r event.EventRegistry) *Conn {
st: false,
in: make(chan *Line, 32),
out: make(chan string, 32),
- cSend: make(chan bool),
- cLoop: make(chan bool),
- cPing: make(chan bool),
+ cSend: make(chan bool, 1),
+ cLoop: make(chan bool, 1),
+ cPing: make(chan bool, 1),
SSL: false,
SSLConfig: nil,
PingFreq: 3 * time.Minute,
from goirc.
This should be fixed in the master branch -- I use a single channel close to kill all of the goroutines there. Be warned there are other races too, mostly w.r.t. state tracking. I've been too damn busy to work on fixing it all up, sorry :-/
from goirc.
Related Issues (20)
- Dispatch runLoop deadlock when removing a handler from within a handler HOT 2
- Can read messages but can't seem to send? HOT 1
- Remove dependency on x/net/proxy HOT 2
- NewNick handler needs a max length check HOT 6
- Client gets very confused when nickname is longer than NICKLEN HOT 3
- xdcc client HOT 3
- Invalid/expired certificate HOT 8
- Support IRCv3 capability negotiation during registration. HOT 8
- Support STARTTLS (and CAP tls requesting).
- Allow rate limiting code to be changed. HOT 2
- question only. HOT 1
- TestPing is unstable... HOT 7
- TLS issues not detected at connection time HOT 1
- Allow user to close connection if server doesn't close after to QUIT. HOT 4
- Can I handle event RECONNECT? HOT 2
- ERROR message from the server is not handled HOT 1
- Stupid question (new to irc in general) HOT 2
- Conn:String method deadlock HOT 1
- disconnect event delay too much HOT 2
- call of reflect.Value.Type on zero Value HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goirc.