xtaci
4c827cfd42
set nil after token recycle
v1.2.9
2019-04-23 21:09:37 +08:00
xtaci
8b93fb28e5
abandom bytes.Buffer for stream buffer
v1.2.8
2019-04-23 20:34:21 +08:00
xtaci
804c20e2b0
save up to 64k
v1.2.7
2019-04-22 11:01:22 +08:00
xtaci
4eb72b6c8d
frame version check failure will close connection
2019-04-18 19:58:34 +08:00
xtaci
d568d23290
fix a potential logic race
v1.2.6
2019-04-18 14:09:03 +08:00
xtaci
11b388cc29
make sure close(conn) is before streamLock
v1.2.5
2019-04-18 13:46:20 +08:00
xtaci
e12a73f3f4
handle error in discard
v1.2.4
2019-04-18 12:14:47 +08:00
xtaci
a86d25d4e7
fix bug in issue #48
2019-04-18 12:11:31 +08:00
xtaci
6e0e0d2e80
better handling of token bucket notify
v1.2.3
2019-04-17 22:26:12 +08:00
xtaci
5eb9306e00
Revert "make sure streamLock is non-blocking due to receiveBytes"
...
This reverts commit 20e41dd6bd .
2019-04-17 21:44:28 +08:00
xtaci
20e41dd6bd
make sure streamLock is non-blocking due to receiveBytes
2019-04-17 21:29:58 +08:00
xtaci
8a71918d00
copy directly into bytes.Buffer without a tmp buffer
v1.2.2
2019-04-08 15:47:16 +08:00
xtaci
427ad5fcc4
remove log
v1.2.1
2019-04-07 22:00:13 +08:00
xtaci
77b36b6b12
add buffersWriter interface and optimize for gathered writing
2019-04-07 21:59:32 +08:00
xtaci
b45c894069
fan in writeFrameInternal
v1.1.2
2019-03-24 18:40:36 +08:00
xtaci and GitHub
f4f6ca39c6
Merge pull request #43 from jannson/fix-keepalive-block
...
fix: writeFrame may block forever in keepalive function
v1.0.8
v1.0.9
v1.1.1
2019-02-13 00:38:44 +08:00
jannson
d48c64181c
no errTimeout checking for writeFrameInternal in keepalive, do it simple, but better
2019-02-13 00:36:40 +08:00
jannson
0bafab3e44
use writeFrameInternal instead of writeFrameWithDeadline
2019-02-12 23:58:45 +08:00
jannson
5bef4b83d6
calling writeFrameWithDeadline in writeFrame for better reading
2019-02-12 23:50:01 +08:00
jannson
d7d8337fbf
all cover for writeFrameWithDeadline
2019-02-12 21:48:52 +08:00
janson
2c51c16a69
do better coverage
2019-02-12 19:00:43 +08:00
janson
2775ecb3f8
add TestKeepAliveBlockWriteTimeout and TestDeadlineFrame
2019-02-12 14:31:33 +08:00
janson
0b0a666e49
fix: writeFrame may block forever in keepalive function, then it never timeout
2019-02-12 10:00:08 +08:00
xtaci and GitHub
6cf098d439
Merge pull request #40 from CovenantSQL/master
...
Expose Stream.die via Stream.GetDieCh for canceling running golang RPC func
v1.1.0
2018-12-05 12:40:55 +08:00
auxten
9a596215cd
Fix forget to close server session
2018-12-05 11:34:04 +08:00
auxten
adfc81dd78
Add Stream.GetDieCh which returns a readonly chan to get notified when the stream is to be closed
2018-12-05 11:24:20 +08:00
auxten
d3b4611595
Expose Stream.die to Stream.Die for canceling running golang RPC func
2018-12-04 12:14:14 +08:00
xtaci and GitHub
f19baee51e
Merge pull request #39 from HaraldNordgren/go_versions
...
Bump Go versions and use '.x' to always get latest patch versions
2018-10-28 23:51:15 +08:00
Harald Nordgren
8a3a4d83f8
Bump Go versions and use '.x' to always get latest patch versions
2018-10-28 16:31:56 +01:00
xtaci
545ecee9d2
fix the deadline test
2018-10-01 11:19:09 +08:00
xtaci
8edaea72f5
fix a test
2018-10-01 11:16:18 +08:00
xtaci
8cc526d020
fix travis build version
2018-10-01 11:10:15 +08:00
xtaci
23098c5322
upd framesize to 32768 to fix crash to the overflow of uint16
2018-10-01 10:54:41 +08:00
xtaci
9bcf9cb852
adjust default frame size
2018-09-28 20:19:29 +08:00
xtaci
b993df6776
simplify header handling
2018-09-28 19:40:24 +08:00
xtaci and GitHub
e28719eede
Merge pull request #27 from longzhiri/master
...
fix bug: read 0 bytes from a stream will block forever
v1.0.7
2018-01-04 17:41:28 +08:00
zero
d502b06712
fix bug: read 0 bytes from a stream will block forever
2018-01-04 17:07:39 +08:00
xtaci
c3e18246ff
remove an unnecessary condition
2017-12-16 17:30:04 +08:00
xtaci and GitHub
c898867f4f
Merge pull request #26 from artyom/master
...
Fixes of issues discovered by code analysis tool
2017-12-13 18:37:12 +08:00
Artyom Pervukhin
5eec685c3d
Remove no more used import in tests
...
Profiles can be generated directly by the go test command when run with
-*profile flags.
2017-12-13 13:05:05 +03:00
Artyom Pervukhin
c600108e14
Don't leak net.Listener in testing helper getTCPConnectionPair
2017-12-13 13:03:11 +03:00
Artyom Pervukhin
545966cdfb
Get rid of hard-coded ports in tests
...
Dynamically allocate ports for test listeners to avoid possible
collisions with local services. Set up and tear down listener for each
test.
2017-12-13 13:00:07 +03:00
Artyom Pervukhin
d9d7e13dec
Fix TestServerEcho
...
Do not call testing.T.Fatal from inside extra goroutine. Documentation
for testing.T https://golang.org/pkg/testing/#T states that Fatal method
should only be called from the main goroutine running test:
> A test ends when its Test function returns or calls any of the methods
> FailNow, Fatal, Fatalf, SkipNow, Skip, or Skipf. Those methods, as well as
> the Parallel method, must be called only from the goroutine running the Test
> function.
>
> The other reporting methods, such as the variations of Log and Error, may be
> called simultaneously from multiple goroutines.
Change t.Fatal call with t.Error call.
While here, also simplify goroutine body to be have less indentation levels and
be just a function returning error while using idiomatic defers to close
things.
2017-12-13 12:19:02 +03:00
Artyom Pervukhin
d4fb677d96
Simplify condition in tests
...
Condition
if session.IsClosed() != true
can be reduced to
if !session.IsClosed()
2017-12-13 12:01:59 +03:00
Artyom Pervukhin
99d8597e59
Replace d.Sub(time.Now()) with time.Until(d)
2017-12-13 12:00:10 +03:00
xtaci
ebec7ef257
adjust read after close behavior https://github.com/xtaci/smux/issues/23
v1.0.6
2017-07-01 21:47:59 +08:00
xtaci
2de5471dfc
use mutex instead of atomic for accuracy
2017-04-22 11:45:03 +08:00
xtaci
b19bc4137c
add a flag for goAway
2017-04-22 11:22:36 +08:00
xtaci
9d687f7d77
handle stream id overflow
2017-04-22 11:05:49 +08:00
xtaci
0f6b9aaeca
update tests
2017-04-05 10:19:56 +08:00