From 134df290a33379b3155ffb821fdfa4a1345ca01a Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Fri, 28 Apr 2023 09:14:50 +0200 Subject: [PATCH] wip --- lib/connections/quic_listen.go | 1 + lib/protocol/protocol.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/connections/quic_listen.go b/lib/connections/quic_listen.go index 18723fcd4..4146ebd1c 100644 --- a/lib/connections/quic_listen.go +++ b/lib/connections/quic_listen.go @@ -97,6 +97,7 @@ func (t *quicListener) serve(ctx context.Context) error { } defer func() { _ = udpConn.Close() }() + // XXX: HAX TO BE REVERTED // svc, conn := stun.New(t.cfg, t, udpConn) // defer conn.Close() diff --git a/lib/protocol/protocol.go b/lib/protocol/protocol.go index 6912d281d..e865792de 100644 --- a/lib/protocol/protocol.go +++ b/lib/protocol/protocol.go @@ -272,8 +272,8 @@ func newRawConnection(deviceID DeviceID, stream netutil.Stream, receiver Model, receiver: receiver, stream: cs, awaiting: make(map[int]chan asyncResult), - inbox: make(chan streamMessage, 1), - outbox: make(chan asyncMessage, 1), + inbox: make(chan streamMessage), + outbox: make(chan asyncMessage), closeBox: make(chan asyncMessage), clusterConfigBox: make(chan *ClusterConfig), dispatcherLoopStopped: make(chan struct{}), @@ -436,7 +436,7 @@ func (c *rawConnection) streamForRequest(ctx context.Context) chan asyncMessage } func (c *rawConnection) registerNewSubstream(strm io.ReadWriteCloser) chan asyncMessage { - outbox := make(chan asyncMessage, 1) + outbox := make(chan asyncMessage) c.substreams = append(c.substreams, outbox) go c.substreamReaderLoop(strm, outbox) go c.substreamWriterLoop(strm, outbox)