mirror of
https://github.com/soypat/lneto.git
synced 2026-09-11 00:59:30 +00:00
HTTP and Listener improvements and bugfixes (#17)
* listener revamp * improvements to conn lifetimes
This commit is contained in:
@@ -41,7 +41,8 @@ func TestTCPListener_ConcurrentEcho(t *testing.T) {
|
||||
tcpPool, err := NewTCPPool(TCPPoolConfig{
|
||||
PoolSize: numClients,
|
||||
QueueSize: 4,
|
||||
BufferSize: 512,
|
||||
TxBufSize: 512,
|
||||
RxBufSize: 512,
|
||||
EstablishedTimeout: 5 * time.Second,
|
||||
ClosingTimeout: 5 * time.Second,
|
||||
})
|
||||
@@ -198,7 +199,7 @@ func echoServer(ctx context.Context, listener *tcp.Listener) {
|
||||
continue
|
||||
}
|
||||
|
||||
conn, err := listener.TryAccept()
|
||||
conn, _, err := listener.TryAccept()
|
||||
if err != nil || conn == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user