longer wait
This commit is contained in:
@@ -134,8 +134,8 @@ func WaitForFrame(conn net.Conn, resultChan chan<- FrameWithPayload) error {
|
||||
}
|
||||
|
||||
type GenericListener struct {
|
||||
Closed bool
|
||||
handlers map[FrameType]func(*FrameWithPayload, chan<- FrameWithPayload) error
|
||||
StopListener bool
|
||||
handlers map[FrameType]func(*FrameWithPayload, chan<- FrameWithPayload) error
|
||||
}
|
||||
|
||||
func (c *Connection) Listen() (*GenericListener, error) {
|
||||
@@ -147,7 +147,7 @@ func (c *Connection) Listen() (*GenericListener, error) {
|
||||
handlers: make(map[FrameType]func(*FrameWithPayload, chan<- FrameWithPayload) error),
|
||||
}
|
||||
go func() {
|
||||
for !ret.Closed {
|
||||
for !ret.StopListener {
|
||||
connection, err := l.Accept()
|
||||
if err != nil {
|
||||
log.Fatalf("Error accepting connection: %v\n", err)
|
||||
@@ -159,7 +159,7 @@ func (c *Connection) Listen() (*GenericListener, error) {
|
||||
}
|
||||
|
||||
const (
|
||||
MaxCallDuration = 500 * time.Millisecond
|
||||
MaxCallDuration = 1500 * time.Millisecond
|
||||
)
|
||||
|
||||
func (l *GenericListener) HandleConnection(conn net.Conn) {
|
||||
|
||||
Reference in New Issue
Block a user