forked from External/ergo
remove unnecessary indirection in semaphore
This commit is contained in:
parent
549d06bc98
commit
5b33cd436f
7 changed files with 39 additions and 40 deletions
|
|
@ -40,10 +40,10 @@ type Socket struct {
|
|||
// NewSocket returns a new Socket.
|
||||
func NewSocket(conn IRCConn, maxSendQBytes int) *Socket {
|
||||
result := Socket{
|
||||
conn: conn,
|
||||
maxSendQBytes: maxSendQBytes,
|
||||
conn: conn,
|
||||
maxSendQBytes: maxSendQBytes,
|
||||
writerSemaphore: utils.NewSemaphore(1),
|
||||
}
|
||||
result.writerSemaphore.Initialize(1)
|
||||
return &result
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue